Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 17-01-2006, 09:12 PM   #1
Registered User
Join Date: Jun 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Forcing a check box to be checked.

What is the mel command to ensure that a checkbox is always checked in the options dialog box of a command. Ie, in the duplicate options box, how would I make sure that the force unique name checkbox is always checked even after the user chooses reset settings.

Currently my approach is:

optionVar -iv "duplicateRenameChildren" 1;

but that does not hold when the resets tool options.

nnng2001 is offline   Reply With Quote
Old 12-02-2006, 09:46 PM   #2
Registered User
skywola's Avatar
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts

Not sure exactly what you are doing with the code because you did not post it, but you can create a window with checkboxes:

string $window = `window -width 50`;
columnLayout -adjustableColumn true;
checkBox -v true;
showWindow $window;
window -edit -widthHeight 40 60 $window;

and use the "-v true" parameter to default one as true. Regarding "resetting", if you are resetting within your own
code, you could just re-draw the window if necessary.
That is the best answer I know of without actually
seeing the code.
skywola is offline   Reply With Quote
Old 12-02-2006, 10:32 PM   #3
gster123's Avatar
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts

Not really used mel but i'd be sure in the form creation hat you would use checkbox.true so that on creation its checked, I come from a C++ background
gster123 is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.