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/parentflag. 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/globalflag is used. In this case the collection has no parent menu and must be explicitly deleted with the deleteUIcommand when it is no longer wanted.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
defineTemplate (dt) | unicode | ||
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. |
|||
exists (ex) | bool | ||
|
|||
gl (gl) | bool | ||
|
|||
parent (p) | unicode | ||
The parent of the collection. The collection will be deleted along with the parent.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
useTemplate (ut) | unicode | ||
|
Derived from mel command maya.cmds.radioMenuItemCollection
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.window( menuBar=True )
# Result: ui.Window('window1') #
pm.menu( label='Position' )
# Result: ui.Menu('window1|menu65') #
pm.radioMenuItemCollection()
# Result: ui.RadioMenuItemCollection('window1|menu65|radioMenuItemCollection25') #
pm.menuItem( label='Top', radioButton=False )
# Result: ui.CommandMenuItem('window1|menu65|menuItem885') #
pm.menuItem( label='Middle', radioButton=False )
# Result: ui.CommandMenuItem('window1|menu65|menuItem886') #
pm.menuItem( label='Bottom', radioButton=True )
# Result: ui.CommandMenuItem('window1|menu65|menuItem887') #
pm.menu( label='Number' )
# Result: ui.Menu('window1|menu66') #
pm.radioMenuItemCollection()
# Result: ui.RadioMenuItemCollection('window1|menu66|radioMenuItemCollection26') #
pm.menuItem( label='One', radioButton=True )
# Result: ui.CommandMenuItem('window1|menu66|menuItem888') #
pm.menuItem( label='Two', radioButton=False )
# Result: ui.CommandMenuItem('window1|menu66|menuItem889') #
pm.menuItem( label='Three', radioButton=False )
# Result: ui.CommandMenuItem('window1|menu66|menuItem890') #
pm.showWindow()
pymel.core.windows.radioCollection
pymel.core.windows.rangeControl
Enter search terms or a module, class or function name.