FORUMS: list search recent posts

Re: Radio Button Script Without Button

COW Forums : Autodesk Maya

Respond to this post   •   Return to posts index   •   Read entire thread

Steve Sayer
Re: Radio Button Script Without Button
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:


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!


Posts IndexRead Thread 

Current Message Thread:

© 2018 All Rights Reserved