View Full Version : 2 Simple Questions - tabLayouts & sliders

02 February 2008, 04:16 AM
If you have multiple tabs, each with a slider, how do you get the value from the slider in the current tab?

Do I need to name controls like sliders differently for each tab? Will the names of the sliders clash if they are the same, or are they subcategories of the tabs?

Thanks in advance.

02 February 2008, 02:13 PM
Do yourself a favor and name your UI controls yourself.

The last piece of string data in the declaration of a control, is the Maya internal name for that control. ex: button -l "Big Red Button" -h 50 -w250 myBigRedButton;

The benefit to naming your controls explicitly is avoiding a bunch of global variables. If you store the internal name that Maya generates for you in a variable, like so:

string $myBigRedButton = `button -l "Big Red Button" -h 50 -w250`;

if you want to refer to the button in a different procedure, you must declare the variables global.

You should be able to come up with a simple naming convention for all your sliders to keep them unique.

tab1sldr1, tab2sldr3 etc.

CGTalk Moderation
02 February 2008, 02:13 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.