Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 17-01-2006 , 09:12 PM
Registered User
Join Date: Jun 2005
Posts: 22

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.

Thanks.

# 2 12-02-2006 , 09:46 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
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;
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.

# 3 12-02-2006 , 10:32 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
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

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads