Your Ad Here

Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

radioMenuItemCollection( [radioMenuItemCollectionName] , [defineTemplate=string], [edit=boolean], [exists=boolean], [gl=boolean], [parent=string], [query=boolean], [useTemplate=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

radioMenuItemCollection is undoable, queryable, and editable.

This command creates a radioMenuItemCollection. Attach radio menu items to radio menu item collection objects to get radio button behaviour. Radio menu item collections will be parented to the current menu if no parent is specified with the -p/parent flag. As children of the menu they will be deleted when the menu is deleted. Collections may also span more than one menu if the -g/global flag is used. In this case the collection has no parent menu and must be explicitly deleted with the deleteUI command when it is no longer wanted.

Flags

defineTemplate, edit, exists, gl, parent, query, useTemplate
Long name (short name) [argument types] Properties
query(q) boolean query
Puts the command in query mode so that it will return the value of the specified flag.

In query mode, this flag needs a value.

edit(e) boolean edit
Puts the command in edit mode so that it will change the values of the specified flags
exists(ex) boolean create
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
defineTemplate(dt) string create
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template.
useTemplate(ut) string create
Will force the command to use a command template other than the current one.
gl(gl) boolean createquery
Set the collection to have no parent menu. Global collections must be explicitly deleted.

In query mode, this flag needs a value.

parent(p) string create
The parent of the collection. The collection will be deleted along with the parent.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Return value


Full path name to the collection.

Python examples

import maya.cmds as cmds

cmds.window( menuBar=True )
cmds.menu( label='Position' )
cmds.radioMenuItemCollection()
cmds.menuItem( label='Top', radioButton=False )
cmds.menuItem( label='Middle', radioButton=False )
cmds.menuItem( label='Bottom', radioButton=True )
cmds.menu( label='Number' )
cmds.radioMenuItemCollection()
cmds.menuItem( label='One', radioButton=True )
cmds.menuItem( label='Two', radioButton=False )
cmds.menuItem( label='Three', radioButton=False )
cmds.showWindow()

  

Return to Autodesk Index


Your Ad Here