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 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
pm.window( menuBar=True )
# Result: ui.Window('window1') #
pm.menu( label='Position' )
# Result: ui.Menu('window1|menu36') #
pm.radioMenuItemCollection()
# Result: ui.RadioMenuItemCollection('window1|menu36|radioMenuItemCollection3') #
pm.menuItem( label='Top', radioButton=False )
# Result: ui.SubMenuItem('window1|menu36|menuItem371') #
pm.menuItem( label='Middle', radioButton=False )
# Result: ui.SubMenuItem('window1|menu36|menuItem372') #
pm.menuItem( label='Bottom', radioButton=True )
# Result: ui.SubMenuItem('window1|menu36|menuItem373') #
pm.menu( label='Number' )
# Result: ui.Menu('window1|menu37') #
pm.radioMenuItemCollection()
# Result: ui.RadioMenuItemCollection('window1|menu37|radioMenuItemCollection4') #
pm.menuItem( label='One', radioButton=True )
# Result: ui.SubMenuItem('window1|menu37|menuItem374') #
pm.menuItem( label='Two', radioButton=False )
# Result: ui.SubMenuItem('window1|menu37|menuItem375') #
pm.menuItem( label='Three', radioButton=False )
# Result: ui.SubMenuItem('window1|menu37|menuItem376') #
pm.showWindow()
pymel.core.windows.radioCollection
pymel.core.windows.rangeControl
Enter search terms or a module, class or function name.