PDA

View Full Version : Gui help needed please.


Hitchcock
10-28-2008, 06:25 PM
Ok all I am trying to make a tool set up for myself that makes my rigging process go quicker, I am trying to embed a tab layout into my setup , so that I can have Tabs for the seperate things I want to do on the rig, whether it be naming or constraining or whatever. I just need some help it keeps giving me the error that it is the incorrect use of tabLayout. Please help me if possible. here is my code so far for the gui.




global proc riggerGUI(){
if (`window -exists "rigger"`)
deleteUI "rigger";
string $rigger = `window -title "rigger"
-iconName "SH"
-widthHeight 200 250`;
string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5 -scr 1 -hst 16 -vst 16 -cr 1`;


string $tab1 = `columnLayout -adj 1`;
setParent..; setParent..;
string $tab2 = `columnLayout -adj 1`;
setParent..; setParent..;
string $tab3 = `columnLayout -adj 1`;
setParent..; setParent..;
string $tab4 = `columnLayout -adj 1`;
setParent..; setParent..;
string $tab5 = `columnLayout -adj 1`;
setParent..; setParent..;

tabLayout -edit
-tabLabel $tab1 "Left Arm"
-tabLabel $tab2 "Right Arm"
-tabLabel $tab3 "Left Leg"
-tabLabel $tab4 "Right Leg"
-tabLabel $tab5 "UI Controls"
$tabs;
setParent $tabs;
string $tabs = tabLayout
columnLayout -adjustableColumn true ;
button -label "Left Arm" -parent $tab1 -command rigCreatorLeftARM;
setParent ..;
columnLayout -adjustableColumn true;
button -label -parent $tab5 "Reload UI" -command hellBoyGUI;
button -label -parent $tab5 "Done" -command ("deleteUI -window " + $rigger);
setParent ..;
showWindow $rigger;
}
riggerGUI;

Norb
10-28-2008, 09:36 PM
At the bottom of your script, you're redefining $tabs and not finishing the tab layout command. I've changed your script a bit to make it work and I think this might be what you're after.


global proc riggerGUI()
{
string $sWin = "rigger";
if (`window -exists $sWin`)
deleteUI $sWin;

window -title "rigger" -iconName "SH" -widthHeight 200 250 $sWin;

string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5 -scr 1 -hst 16 -vst 16 -cr 1`;

string $tab1 = `columnLayout -adj 1`;
setParent..;
setParent..;
string $tab2 = `columnLayout -adj 1`;
setParent..;
setParent..;
string $tab3 = `columnLayout -adj 1`;
setParent..;
setParent..;
string $tab4 = `columnLayout -adj 1`;
setParent..;
setParent..;
string $tab5 = `columnLayout -adj 1`;
setParent..;
setParent..;

tabLayout -edit
-tabLabel $tab1 "Left Arm"
-tabLabel $tab2 "Right Arm"
-tabLabel $tab3 "Left Leg"
-tabLabel $tab4 "Right Leg"
-tabLabel $tab5 "UI Controls"
$tabs;
setParent $tabs;

// create UI items and parent them to the tabs (which are already column layouts)
button -label "Left Arm" -parent $tab1 -command rigCreatorLeftARM;
button -label "Reload UI" -parent $tab5 -command "hellBoyGUI";
button -label "Done" -parent $tab5 -command ("deleteUI -window " + $sWin);


showWindow $sWin;
}
riggerGUI;

CGTalk Moderation
10-28-2008, 09:36 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.