pymel.core.uitypes.CommandMenuItem

Inheritance diagram of CommandMenuItem

class CommandMenuItem

class counterpart of mel function menuItem

This command creates/edits/queries menu items.

getAllowOptionBoxes(**kwargs)

Deprecated. All menus and menu items always allow option boxes. In the case of submenu items this flag specifies whether the submenu will be able to support option box menu items. Always returns true.

Derived from mel command maya.cmds.menuItem

getAltModifier(**kwargs)

Specify this flag if the Alt modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

getAnnotation(**kwargs)

Annotate the menu item with an extra string value.

Derived from mel command maya.cmds.menuItem

getBoldFont(**kwargs)

Specify if text should be bold. Only supported in menus which use the marking menu implementation. Default is false for Windows, and true for all other platforms.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.menuItem

getCheckBox(**kwargs)

Creates a check box menu item. Argument specifies the check box value.

Derived from mel command maya.cmds.menuItem

getCollection(**kwargs)

To explicitly add a radio menu item to a radioMenuItemCollection.

Derived from mel command maya.cmds.menuItem

getCommand(**kwargs)

Attaches a command/script that will be executed when the item is selected. Note this command is not executed when the menu item is in an optionMenucontrol.

Derived from mel command maya.cmds.menuItem

getCommandModifier(**kwargs)

Specify this flag if the command modifier is part of the accelerator sequence. This is only available on systems which have a separate command key.

Derived from mel command maya.cmds.menuItem

getCtrlModifier(**kwargs)

Specify this flag if the Cntl modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

getData(**kwargs)

Attaches a piece of user-defined data to the menu item.

Derived from mel command maya.cmds.menuItem

getDivider(**kwargs)

Creates a divider menu item.

Derived from mel command maya.cmds.menuItem

getDocTag(**kwargs)

Attaches a tag to the menu item.

Derived from mel command maya.cmds.menuItem

getDragDoubleClickCommand(**kwargs)

If the menu item is put on the shelf then this command will be invoked when the corresponding shelf object is double clicked.

Derived from mel command maya.cmds.menuItem

getDragMenuCommand(**kwargs)

If the menu item is put on the shelf then this command will be invoked when the corresponding shelf object is clicked.

Derived from mel command maya.cmds.menuItem

getEchoCommand(**kwargs)

Specify whether the action attached with the c/commandflag should echo to the command output areas when invoked. This flag is false by default and must be specified with the c/commandflag.

Derived from mel command maya.cmds.menuItem

getEnable(**kwargs)

Enable state for the menu item. A disabled menu item is dimmed and unresponsive. An enabled menu item is selectable and has normal appearance.

Derived from mel command maya.cmds.menuItem

getEnableCommandRepeat(**kwargs)

This flag only affects menu items to which a command can be attached. Specify true and the command may be repeated by executing the command repeatLast. This flag is true by default for all items except for option box items.

Derived from mel command maya.cmds.menuItem

getFamilyImage(**kwargs)

Get the filename of the family icon associated with the menu. The family icon will be used for the shelf unless an icon is specified with the imageflag.

Derived from mel command maya.cmds.menuItem

getImage(**kwargs)

The filename of the icon associated with the menu item. If the menu containing the menu item is being edited with a menuEditor widget, then the menuEditor will use this icon to represent the menu item. This icon will be displayed on the shelf when the menu item is placed there.

Derived from mel command maya.cmds.menuItem

getImageOverlayLabel(**kwargs)

Specify a short (5 character) text string to be overlayed on top of the icon associated with the menu item. This is primarily a mechanism for differentiating menu items that are using a Family icon due to the fact that an icon image had not been explicitly defined. The image overlay label will not be used if an icon image is defined for the menu item.

Derived from mel command maya.cmds.menuItem

getIsCheckBox(**kwargs)

Returns true if the item is a check box item.

Derived from mel command maya.cmds.menuItem

getIsOptionBox(**kwargs)

Returns true if the item is an option box item.

Derived from mel command maya.cmds.menuItem

getIsRadioButton(**kwargs)

Returns true if the item is a radio button item.

Derived from mel command maya.cmds.menuItem

getItalicized(**kwargs)

Specify if text should be italicized. Only supported in menus which use the marking menu implementation. Default is false.

Derived from mel command maya.cmds.menuItem

getKeyEquivalent(**kwargs)

Specify the accelerator character. This character is combined with the modifier keys specified with the alt/altModifier, opt/optionModifier, ctl/ctlModifier, cmd/commandModifierand sh/shiftModifierto form the complete accelerator sequence that you can type to execute the menu item. Note that only regular menu items, radio menu items and check box menu items can have an accelerator.

Derived from mel command maya.cmds.menuItem

getLabel(**kwargs)

The text that appears in the item.

Derived from mel command maya.cmds.menuItem

getOptionBox(**kwargs)

Indicates that the menu item will be an option box item. This item will appear to the right of the preceeding menu item.

Derived from mel command maya.cmds.menuItem

getOptionBoxIcon(**kwargs)

The filename of an icon to be used instead of the usual option box icon. The icon is searched for in the folder specified by the XBMLANGPATH environment variable. The icon can be any size, but will be resized to the standard 16x16 pixels when drawn.

Derived from mel command maya.cmds.menuItem

getOptionModifier(**kwargs)

Specify this flag if the Alt (or option) modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

getPostMenuCommand(**kwargs)

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

Derived from mel command maya.cmds.menuItem

getPostMenuCommandOnce(**kwargs)

Indicate the pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the pmc/postMenuCommandis invoked everytime the sub menu is shown.

Derived from mel command maya.cmds.menuItem

getRadialPosition(**kwargs)

The radial position of the menu item if it is in a Marking Menu. Radial positions are given in the form of a cardinal direction, and may be “N”, “NW”, “W”, “SW”, “S”, “SE”, “E” or “NE”.

Derived from mel command maya.cmds.menuItem

getRadioButton(**kwargs)

Creates a radio button menu item. Argument specifies the radio button value.

Derived from mel command maya.cmds.menuItem

getShiftModifier(**kwargs)

Specify this flag if the Shift modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

getSourceType(**kwargs)

Set the language type for a command script. Can only be used in conjunction with a command flag. Without this flag, commands are assumed to be the same language of the executing script. In query mode, will return the language of the specified command. Valid values are “mel” and “python”.

Derived from mel command maya.cmds.menuItem

getSubMenu(**kwargs)

Indicates that the item will have a submenu. Subsequent menuItems will be added to the submenu until setParent -menuis called. Note that a submenu item creates a menu object and consequently the menucommand may be used on the submenu item.

Derived from mel command maya.cmds.menuItem

getTearOff(**kwargs)

For the case where the menu item is a sub menu this flag will make the sub menu tear-off-able. Note that this flag has no effect on the other menu item types.

Derived from mel command maya.cmds.menuItem

setAltModifier(val=True, **kwargs)

Specify this flag if the Alt modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

setAnnotation(val=True, **kwargs)

Annotate the menu item with an extra string value.

Derived from mel command maya.cmds.menuItem

setCheckBox(val=True, **kwargs)

Creates a check box menu item. Argument specifies the check box value.

Derived from mel command maya.cmds.menuItem

setCommand(val=True, **kwargs)

Attaches a command/script that will be executed when the item is selected. Note this command is not executed when the menu item is in an optionMenucontrol.

Derived from mel command maya.cmds.menuItem

setCommandModifier(val=True, **kwargs)

Specify this flag if the command modifier is part of the accelerator sequence. This is only available on systems which have a separate command key.

Derived from mel command maya.cmds.menuItem

setCtrlModifier(val=True, **kwargs)

Specify this flag if the Cntl modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

setData(val=True, **kwargs)

Attaches a piece of user-defined data to the menu item.

Derived from mel command maya.cmds.menuItem

setDocTag(val=True, **kwargs)

Attaches a tag to the menu item.

Derived from mel command maya.cmds.menuItem

setDragDoubleClickCommand(val=True, **kwargs)

If the menu item is put on the shelf then this command will be invoked when the corresponding shelf object is double clicked.

Derived from mel command maya.cmds.menuItem

setDragMenuCommand(val=True, **kwargs)

If the menu item is put on the shelf then this command will be invoked when the corresponding shelf object is clicked.

Derived from mel command maya.cmds.menuItem

setEchoCommand(val=True, **kwargs)

Specify whether the action attached with the c/commandflag should echo to the command output areas when invoked. This flag is false by default and must be specified with the c/commandflag.

Derived from mel command maya.cmds.menuItem

setEnable(val=True, **kwargs)

Enable state for the menu item. A disabled menu item is dimmed and unresponsive. An enabled menu item is selectable and has normal appearance.

Derived from mel command maya.cmds.menuItem

setEnableCommandRepeat(val=True, **kwargs)

This flag only affects menu items to which a command can be attached. Specify true and the command may be repeated by executing the command repeatLast. This flag is true by default for all items except for option box items.

Derived from mel command maya.cmds.menuItem

setImage(val=True, **kwargs)

The filename of the icon associated with the menu item. If the menu containing the menu item is being edited with a menuEditor widget, then the menuEditor will use this icon to represent the menu item. This icon will be displayed on the shelf when the menu item is placed there.

Derived from mel command maya.cmds.menuItem

setImageOverlayLabel(val=True, **kwargs)

Specify a short (5 character) text string to be overlayed on top of the icon associated with the menu item. This is primarily a mechanism for differentiating menu items that are using a Family icon due to the fact that an icon image had not been explicitly defined. The image overlay label will not be used if an icon image is defined for the menu item.

Derived from mel command maya.cmds.menuItem

setKeyEquivalent(val=True, **kwargs)

Specify the accelerator character. This character is combined with the modifier keys specified with the alt/altModifier, opt/optionModifier, ctl/ctlModifier, cmd/commandModifierand sh/shiftModifierto form the complete accelerator sequence that you can type to execute the menu item. Note that only regular menu items, radio menu items and check box menu items can have an accelerator.

Derived from mel command maya.cmds.menuItem

setLabel(val=True, **kwargs)

The text that appears in the item.

Derived from mel command maya.cmds.menuItem

setOptionBoxIcon(val=True, **kwargs)

The filename of an icon to be used instead of the usual option box icon. The icon is searched for in the folder specified by the XBMLANGPATH environment variable. The icon can be any size, but will be resized to the standard 16x16 pixels when drawn.

Derived from mel command maya.cmds.menuItem

setOptionModifier(val=True, **kwargs)

Specify this flag if the Alt (or option) modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

setPostMenuCommand(val=True, **kwargs)

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

Derived from mel command maya.cmds.menuItem

setPostMenuCommandOnce(val=True, **kwargs)

Indicate the pmc/postMenuCommandshould only be invoked once. Default value is false, ie. the pmc/postMenuCommandis invoked everytime the sub menu is shown.

Derived from mel command maya.cmds.menuItem

setRadialPosition(val=True, **kwargs)

The radial position of the menu item if it is in a Marking Menu. Radial positions are given in the form of a cardinal direction, and may be “N”, “NW”, “W”, “SW”, “S”, “SE”, “E” or “NE”.

Derived from mel command maya.cmds.menuItem

setRadioButton(val=True, **kwargs)

Creates a radio button menu item. Argument specifies the radio button value.

Derived from mel command maya.cmds.menuItem

setShiftModifier(val=True, **kwargs)

Specify this flag if the Shift modifier is part of the accelerator sequence.

Derived from mel command maya.cmds.menuItem

setSourceType(val=True, **kwargs)

Set the language type for a command script. Can only be used in conjunction with a command flag. Without this flag, commands are assumed to be the same language of the executing script. In query mode, will return the language of the specified command. Valid values are “mel” and “python”.

Derived from mel command maya.cmds.menuItem

Previous topic

pymel.core.uitypes.CommandLine

Next topic

pymel.core.uitypes.ConfirmDialog

Core

Core Modules

Other Modules

This Page