SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Forcing a check box to be checked.
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 17-01-2006, 08:12 PM   #1
nnng2001
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.

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

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.
skywola is offline   Reply With Quote
Old 12-02-2006, 09:32 PM   #3
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.