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.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

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

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

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.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

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

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

Previous topic

pymel.core.uitypes.MainProgressBar

Next topic

pymel.core.uitypes.MenuBarLayout

Core

Core Modules

Other Modules

This Page