Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
MAYA:MAYA ForumMAYA TutorialsMAYA

Re: Radio Button Script Without Button

COW Forums : MAYA

VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Steve SayerRe: Radio Button Script Without Button
by on Jan 4, 2012 at 4:28:31 pm

The 'radio button group' control simply doesn't understand the '-command' flag.

Different controls have different functions, just like different nodes have different attributes. A polyCube node doesn't have a "radius" attribute but a polySphere node does; if you tried to use MEL to create a cube and use a '-radius' flag you'd get an error.

In the same way, if you try to create a radio button group control and specify a '-command' flag, you'll get an error because that type of control just doesn't know what '-command' means. Rob's solution with the '-changeCommand' flag is what you were looking for. The reasoning behind naming it something different is that you have more options with a set of radio buttons than you do with a single button. A single button can only be clicked, so it only has the '-command' flag. But a set of radio buttons is more complex; you might want different buttons to do different things, you might want different commands for the 'on' and 'off' states for each, etc., so it has the following series of flags:

-changeCommand
-changeCommand1
-changeCommand2
-changeCommand3
-changeCommand4
-onCommand
-onCommand1
-onCommand2
-onCommand3
-onCommand4
-offCommand
-offCommand1
-offCommand2
-offCommand3
-offCommand4
-enable1
-enable2
-enable3
-enable4

Check your Technical Documentation for an explanation of what they all do. In general, you should always be referring to the documentation for each MEL command you use; you can't assume that a flag you've used in one command previously will also be useful in a new command.

Hope that helps!

-Steve


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]