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

Synopsis

radioMenuItemCollection( [string] , [defineTemplate=string], [exists=boolean], [gl=boolean], [parent=string], [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.

Return value

stringFull path name to the collection.

In query mode, return type is based on queried flag.

Flags

defineTemplate, exists, gl, parent, useTemplate
Long name (short name) Argument types Properties
defineTemplate(dt) string create
Puts the 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.
exists(ex) boolean create
Returns whether the specified object exists or not. Other flags are ignored.
gl(gl) boolean createquery
Set the collection to have no parent menu. Global collections must be explicitly deleted.
parent(p) string create
The parent of the collection. The collection will be deleted along with the parent.
useTemplate(ut) string create
Forces the command to use a command template other than the current one.

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.

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()