The following code creates a simple GUI for rig creation. My problem seems to be in formatting. Using the already implemented layouts, is it possible to make everything centered? If so, can someone point out my blatant mistake? The create controls section is not aligning correctly.
[codebox]
if(window -exists "bipedWin")
{
warning("Rigging window already open. Deleting UI and reopening.");
deleteUI -window "bipedWin";
}
global int $fingers;
global int $rigType;
string $bipedWindow = `window -height 400 -width 250 -s 0 -title "Marionette RIG Creation" -mxb 0 bipedWin `;
columnLayout -width 250 -cal "left" containerLayout ;
text -width 250 -height 30 -label "Template Creation" -font "fixedWidthFont";
string $fingerGroup = `radioButtonGrp -numberOfRadioButtons 3 -select 3 -width 250 -label "Fingers:" -labelArray3 "2" "3" "5" -cal 1 "left" -cal 2 "left" -cal 3 "left" -cw 1 50 -cw 2 30 -cw 3 30 -on1 "$fingers = 2" -on2 "$fingers = 3" -on3 "$fingers = 5" -en1 0 -en2 0` ;
string $rigDecision = `radioButtonGrp -numberOfRadioButtons 2 -select 1 -width 250 -label "Rig Type:" -labelArray2 "Key Frame" "Motion Capture" -cal 1 "left" -cal 2 "left" -cw 1 55 -cw 2 75 -on1 "$rigType = 1" -on2 "$rigType = 2" -en1 1 -en2 1` ;
rowLayout -numberOfColumns 2 -width 250 -ct2 "left" "right";
button -label "Create Template" -al "left" -width 90 -height 25 -c "makeTemplate($fingers, $rigType)";
button -label "Delete Template" -al "left" -width 90 -height 25 -c "delTemplate";
setParent ..;
button -label "Delete All" -ann "Delete all rig related nodes: skeleton, movers, RIG components" -al "center" -w 200 -h 20 -c "deleteNodes();";
separator -w 250 -style "out" -height 10 -hr 1;
text -width 250 -height 30 -label "Rig Creation" -font "fixedWidthFont";
// Create rig and various options
rowColumnLayout -numberOfRows 2 -width 250 -parent bipedWin optionsContainer;
button -label "Create Controls" -al "center" -height 25 -width 20 -c "";
checkBoxGrp -ncb 2 -ann "Various options for the RIG" -label "RIG Options" -la2 "Keyable Pivots" "Spine Controls" -va2 1 1 optionsGroup;
setParent ..;
rowColumnLayout -e -w 250 optionsContainer;
// End rig and options
button -label "Freeze Transforms" -ann "Do this after you modify the control boxes to your needs. This is a required step" -al "center" -w 200 -h 20 -c "freezeControlTransforms()";
button -label "Build Connections" -al "center" -ann "Connect the RIG to the skeleton (Optional for Mocap Rig)" -c "makeRig($rigType)";
window -e -wh 250 400 bipedWin;
showWindow $bipedWindow;
[/codebox]