Action to generate popup connection menus for Hypershade. This command is used internally by the Hypershade panel.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
beginMenu (beg) | bool | ||
If true the menu will be used to start a connection edit so it will list all available attributes for either inputs or outputs. If false the menu will be used to complete a connection so it will list only the attributes compatible with the attribute at the other end of the connection. A plug must be supplied in this case. |
|||
editor (edt) | unicode | ||
Name of the Hypergraph, Hypershade or Visor editor for which this menu is being built. This argument is no longer mandatory. If it is omitted, the inputs flag and the node must be used to specify the search targets. This allows attributeMenu to be used in the absence of a hypershade editor. |
|||
finishMenu (fsh) | bool | ||
|
|||
inputs (inp) | bool | ||
|
|||
plug (p) | PyNode | ||
|
This flag will register a callback that allows the user to define their own popup menu for a specific node type for use in the Hypershade and Hypergraph editor. The command signature should look like this: global proc int proc_name(string $editorName, string $nodeName, string $plug, string $mode, string $menuType)The method should return 0 if it does not recognize the node type and the default attributeMenu popup menu will be displayed. If the callback returns one then the menu is considered built and no other menuItems will be added to the popup. The return value from this flag will be the ID to use for the -unregPulldownMenuCommand flag. |
This flag will unregister a callback procedure that was registered with the -regPulldownMenuCommand flag. The argument should be the integer identifier returned from the -regPulldownMenuCommand flag.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.attributeMenu
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.attributeMenu( 'nodeName', inputs=1, beginMenu=True, editor='editor' )
pm.attributeMenu( 'nodeName', inputs=0, beginMenu=True, editor='editor' )
pymel.core.windows.attrNavigationControlGrp
Enter search terms or a module, class or function name.