pymel.core.uitypes.Menu — PyMEL 1.0.7 documentation

pymel.core.uitypes.Menu

Inheritance diagram of Menu

class Menu

class counterpart of mel function menu

This command creates a new menu and adds it to the default window’s menubar if no parent is specified. The menu can be enabled/disabled. Note that this command may also be used on menu objects created using the command menuItem -sm/subMenu true.

deleteAllItems(val=True, **kwargs)

Delete all the items in this menu.

Derived from mel command maya.cmds.menu

getAllowOptionBoxes(**kwargs)

Deprecated. All menus now always allow option boxes. Indicate whether the menu will be able to support option box menu items.

Derived from mel command maya.cmds.menu

getDocTag(**kwargs)

Attaches a tag to the menu.

Derived from mel command maya.cmds.menu

getEnable(**kwargs)

Enables/disables the menu.

Derived from mel command maya.cmds.menu

getFamilyImage(**kwargs)

The filename of the icon associated with the menu. This icon will be used if a menu item does not have an icon image defined.

Derived from mel command maya.cmds.menu

getHelpMenu(**kwargs)

Indicates that this menu is the help menu and will be the right most menu in the menu bar. On Unix systems the help menu is also right justified in the menu bar.

Derived from mel command maya.cmds.menu

getItemArray()

Modified to return pymel instances

getLabel(**kwargs)

The text that is displayed for the menu. If no label is supplied then the menuName will be used.

Derived from mel command maya.cmds.menu

getLtVersion(**kwargs)

This flag is used to specify the Maya LT version that this control feature was introduced, if the version flag is not specified, or if the version flag is specified but its argument is different. This value is only used by Maya LT, and otherwise ignored. The argument should be given as a string of the version number (e.g. 2014, 2015). Currently only accepts major version numbers (e.g. 2014.5 should be given as 2014). Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.menu

getMnemonic(**kwargs)

Set the Alt key to post that menu. The character specified must match the case of its corresponding character in the menu item text, but selection from the keyboard is case insensitive.

Derived from mel command maya.cmds.menu

getNumberOfItems(**kwargs)

Return number of items in the menu.

Derived from mel command maya.cmds.menu

getPostMenuCommandOnce(**kwargs)

Indicate the -pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the -pmc/postMenuCommandis invoked every time the menu is shown.

Derived from mel command maya.cmds.menu

getVersion(**kwargs)

Specify the version that this menu feature was introduced. The argument should be given as a string of the version number (e.g. 2014, 2015). Currently only accepts major version numbers (e.g. 2014.5 should be given as 2014).

Derived from mel command maya.cmds.menu

getVisible(**kwargs)

Shows/hides the menu.

Derived from mel command maya.cmds.menu

makeDefault()

set this layout as the default parent

postMenuCommand(val=True, **kwargs)

Specify a script to be executed when the menu is about to be shown.

Derived from mel command maya.cmds.menu

setDocTag(val=True, **kwargs)

Attaches a tag to the menu.

Derived from mel command maya.cmds.menu

setEnable(val=True, **kwargs)

Enables/disables the menu.

Derived from mel command maya.cmds.menu

setFamilyImage(val=True, **kwargs)

The filename of the icon associated with the menu. This icon will be used if a menu item does not have an icon image defined.

Derived from mel command maya.cmds.menu

setHelpMenu(val=True, **kwargs)

Indicates that this menu is the help menu and will be the right most menu in the menu bar. On Unix systems the help menu is also right justified in the menu bar.

Derived from mel command maya.cmds.menu

setLabel(val=True, **kwargs)

The text that is displayed for the menu. If no label is supplied then the menuName will be used.

Derived from mel command maya.cmds.menu

setLtVersion(val=True, **kwargs)

This flag is used to specify the Maya LT version that this control feature was introduced, if the version flag is not specified, or if the version flag is specified but its argument is different. This value is only used by Maya LT, and otherwise ignored. The argument should be given as a string of the version number (e.g. 2014, 2015). Currently only accepts major version numbers (e.g. 2014.5 should be given as 2014). Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.menu

setMnemonic(val=True, **kwargs)

Set the Alt key to post that menu. The character specified must match the case of its corresponding character in the menu item text, but selection from the keyboard is case insensitive.

Derived from mel command maya.cmds.menu

setPostMenuCommandOnce(val=True, **kwargs)

Indicate the -pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the -pmc/postMenuCommandis invoked every time the menu is shown.

Derived from mel command maya.cmds.menu

setVersion(val=True, **kwargs)

Specify the version that this menu feature was introduced. The argument should be given as a string of the version number (e.g. 2014, 2015). Currently only accepts major version numbers (e.g. 2014.5 should be given as 2014).

Derived from mel command maya.cmds.menu

setVisible(val=True, **kwargs)

Shows/hides the menu.

Derived from mel command maya.cmds.menu