Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

attributeMenu [-beginMenu] [-editor string] [-finishMenu] [-inputs boolean] [-plug name] [-regPulldownMenuCommand string] [-unregPulldownMenuCommand int]

attributeMenu is NOT undoable, NOT queryable, and NOT editable.

Action to generate popup connection menus for Hypershade. This command is used internally by the Hypershade panel.

Return value

string

Keywords

render, hypergraph, shader, hypershade

Flags

beginMenu, editor, finishMenu, inputs, plug, regPulldownMenuCommand, unregPulldownMenuCommand
Long name (short name) Argument types Properties
-beginMenu(-beg) create
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.
-finishMenu(-fsh) create
finishes the menu
-inputs(-inp) boolean create
If true only attributes which can be used as inputs will be listed. If false only attributes which can be used as outputs will be listed
-plug(-p) name create
If inputs is false then we are completing a connection and the name of the plug at the other end of the connection must be supplied.
-editor(-edt) string create
Name of the Hypergraph, Hypershade or Visor editor for which this menu is being built. This argument is mandatory.
-regPulldownMenuCommand(-rpm) string create
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.
-unregPulldownMenuCommand(-upm) int create
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 command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

attributeMenu -inputs 1 -beginMenu -editor editor nodeName;
attributeMenu -inputs 0 -beginMenu -editor editor nodeName;