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

Synopsis

nodeEditor [-addNewNodes boolean] [-addNode string] [-additiveGraphingMode boolean] [-allAttributes boolean] [-allNodes boolean] [-autoSizeNodes boolean] [-beginCreateNode] [-beginNewConnection string] [-breakSelectedConnections] [-control] [-createInfo string] [-createNodeCommand script] [-cycleHUD] [-defaultPinnedState boolean] [-defineTemplate string] [-deleteSelected] [-docTag string] [-dotFormat string] [-downstream boolean] [-exists] [-extendToShapes boolean] [-feedbackConnection] [-feedbackNode] [-feedbackPlug] [-feedbackType] [-filter string] [-filterCreateNodeTypes script] [-forceMainConnection string] [-frameAll] [-frameModelSelection] [-frameSelected] [-getNodeList] [-graphSelectedConnections] [-gridSnap boolean] [-gridVisibility boolean] [-highlightConnection string] [-hudMessage string int float] [-ignoreAssets boolean] [-island boolean] [-keyPressCommand script] [-keyReleaseCommand script] [-layout] [-layoutCommand script] [-lockMainConnection] [-mainListConnection string] [-nodeTitleMode string] [-nodeViewMode string] [-panView float float] [-panel string] [-parent string] [-pinSelectedNodes boolean] [-popupMenuScript script] [-removeDownstream] [-removeNode string] [-removeUnselected] [-removeUpstream] [-renameNode string] [-restoreInfo string] [-rootNode string] [-rootsFromSelection boolean] [-scaleView float] [-selectAll] [-selectConnectionNodes] [-selectDownstream] [-selectFeedbackConnection] [-selectNode string] [-selectUpstream] [-selectionConnection string] [-settingsChangedCallback script] [-shaderNetworks] [-showAllNodeAttributes string] [-showNamespace boolean] [-showSGShapes boolean] [-showShapes boolean] [-showTransforms boolean] [-stateString] [-syncedSelection boolean] [-toggleSelectedPins boolean] [-toggleSwatchSize string] [-toolTipCommand script] [-traversalDepthLimit int] [-unParent] [-unlockMainConnection] [-updateMainConnection] [-upstream boolean] [-useTemplate string] [string]

nodeEditor is undoable, queryable, and editable.

This command creates/edits/queries a nodeEditor editor. The optional argument is the name of the control.

Return value

stringThe name of the created control.

In query mode, return type is based on queried flag.

Flags

addNewNodes, addNode, additiveGraphingMode, allAttributes, allNodes, autoSizeNodes, beginCreateNode, beginNewConnection, breakSelectedConnections, control, createInfo, createNodeCommand, cycleHUD, defaultPinnedState, defineTemplate, deleteSelected, docTag, dotFormat, downstream, exists, extendToShapes, feedbackConnection, feedbackNode, feedbackPlug, feedbackType, filter, filterCreateNodeTypes, forceMainConnection, frameAll, frameModelSelection, frameSelected, getNodeList, graphSelectedConnections, gridSnap, gridVisibility, highlightConnection, hudMessage, ignoreAssets, island, keyPressCommand, keyReleaseCommand, layout, layoutCommand, lockMainConnection, mainListConnection, nodeTitleMode, nodeViewMode, panView, panel, parent, pinSelectedNodes, popupMenuScript, removeDownstream, removeNode, removeUnselected, removeUpstream, renameNode, restoreInfo, rootNode, rootsFromSelection, scaleView, selectAll, selectConnectionNodes, selectDownstream, selectFeedbackConnection, selectNode, selectUpstream, selectionConnection, settingsChangedCallback, shaderNetworks, showAllNodeAttributes, showNamespace, showSGShapes, showShapes, showTransforms, stateString, syncedSelection, toggleSelectedPins, toggleSwatchSize, toolTipCommand, traversalDepthLimit, unParent, unlockMainConnection, updateMainConnection, upstream, useTemplate
Long name (short name) Argument types Properties
-exists(-ex) create
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
-defineTemplate(-dt) string create
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template.
-useTemplate(-ut) string create
Force the command to use a command template other than the current one.
-panel(-pnl) string createquery
Specifies the panel that the editor belongs to. By default if an editor is created in the create callback of a scripted panel it will belong to that panel. If an editor doesn't belong to a panel it will be deleted when the window that it is in is deleted.
-parent(-p) string createqueryedit
Specifies the parent layout for this editor. This flag will only have an effect if the editor is currently un-parented.
-unParent(-up) createedit
Specifies that the editor should be removed from its layout. This cannot be used with query.
-control(-ctl) query
Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus. Caution: It is possible, at times, for an editor to exist without a control. This flag returns "NONE" if no control is present.
-mainListConnection(-mlc) string createqueryedit
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object.
-forceMainConnection(-fmc) string createqueryedit
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession.
-selectionConnection(-slc) string createqueryedit
Specifies the name of a selectionConnection object which the editor will synchronize with its own selection list. As the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes changes, the editor updates to show the change.
-highlightConnection(-hlc) string createqueryedit
Specifies the name of a selectionConnection object which the editor will synchronize with its highlight list. Not all editors have a highlight list. For those that do, it is a secondary selection list.
-filter(-f) string createqueryedit
Specifies the name of an itemFilter object to be placed on this editor. This filters the information coming onto the main list of the editor.
-lockMainConnection(-lck) createedit
Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor. Further changes to the original mainConnection are ignored.
-stateString(-sts) query
Query only flag. Returns the MEL command that will edit an editor to match the current editor state. The returned command string uses the string variable $editorName in place of a specific name.
-unlockMainConnection(-ulk) createedit
Unlocks the mainConnection, effectively restoring the original mainConnection (if it is still available), and dynamic updates.
-updateMainConnection(-upd) createedit
Causes a locked mainConnection to be updated from the orginal mainConnection, but preserves the lock state.
-docTag(-dtg) string createqueryedit
Attaches a tag to the Maya editor.
-addNewNodes(-ann) boolean createqueryedit
New nodes should be added to the graph, default is on.
-addNode(-an) string editmultiuse
Adds a specified node to the graph. Passing an empty string means the current model selection will be added to the graph.
-allAttributes(-ala) boolean createqueryedit
Attributes should not be filtered out of the graph, default is off.
-allNodes(-aln) boolean createqueryedit
Nodes should not be filtered out of the graph, default is off.
-autoSizeNodes(-asn) boolean createqueryedit
When enabled, default node widths will be dynamically determined by the node name length, default is on.
-beginNewConnection(-bnc) string edit
Begin a new interactive connection at the given attribute.
-beginCreateNode(-bcn) edit
Begin interactive node-creation at the mouse position. This will create a control which allows quick creation of a node in the editor.
The actual creation is delegated to the createNodeCommand.
-createNodeCommand(-cnc) script createqueryedit
Specifies a function to be used to create nodes through the editor. The function will be passed the name of the chosen node type. This is used by the tab-create workflow. By default createNode is used.
-cycleHUD(-ch) createedit
Change the HUD to the next state.
-dotFormat(-dot) string queryedit
In query mode:
Get the graph information in DOT format. The flag argument specifies a file path to write to.
If "-" is supplied, the data is returned as a string, otherwise the size in bytes of the written file is returned.
In edit mode:
Sets the positions of nodes in the graph from a Graphviz output file in plain format. Only the node position, width and height information is used.
If the argument starts with "graph ", it will be treated as the plain data instead of a filename.

In query mode, this flag needs a value.

-downstream(-ds) boolean createqueryedit
Include nodes which are downstream of the root nodes.
-filterCreateNodeTypes(-fcn) script createqueryedit
Specifies a function to be used to filter the list of node types which appear in the inline-creation menu (tab key). The function should accept one string array argument and return a string array.
-ignoreAssets(-ia) boolean createqueryedit
Do not display asset contents as subgraphs, instead show asset-related nodes as normal nodes, default is off.
-upstream(-ups) boolean createqueryedit
Include nodes which are upstream of the root nodes.
-rootNode(-rn) string createqueryeditmultiuse
Add a node name as a root node of the graph. Passing an empty string clears the current root node list. When queried, returns the list of current root nodes.
-rootsFromSelection(-rfs) boolean createedit
Specify that the root nodes for the graph should taken from the currently active selection.
-selectAll(-sa) edit
Select all items in the graph.
-selectUpstream(-su) edit
Select all items upstream to the currently active selection.
-selectDownstream(-sd) edit
Select all items downstream to the currently active selection.
-selectNode(-sln) string queryeditmultiuse
Select a node in the graph. Passing an empty string clears the current selection. When queried, returns the list of currently selected nodes.
-syncedSelection(-ssl) boolean createqueryedit
Keep the graph selection in sync with the model selection.
-toolTipCommand(-ttc) script createqueryedit
Specifies a function to override the tooltip that is displayed for a node. The function will be passed the name of the node under the cursor, and should return a text string to be displayed. A simple HTML 4 subset is supported.
-traversalDepthLimit(-tdl) int createqueryedit
Specify the maximum number of edges which will be followed from any root node when building the graph. A negative value means unlimited. Default is unlimited.
-layout(-lay) edit
Perform an automatic layout of the graph.
-layoutCommand(-lc) script createqueryedit
Specifies a function to override the default action when a graph layout is required. The function will be passed the name of editor. The function should arrange the nodes in the graph.
-frameAll(-fa) edit
Frame all the contents of the node editor.
-frameModelSelection(-fms) edit
Frame the current model selection.
-frameSelected(-fs) edit
Frame the selected contents of the node editor.
-island(-isl) boolean queryedit
Graph DG islands instead of dependency nodes.
-popupMenuScript(-pms) script createqueryedit
Set the script to be called to register the popup menu with the control for this editor. The script will be called with a string argument which gives the name of the editor whose control the popup menu should be parented to.
-scaleView(-sv) float edit
Scales the graph view by the given factor. An argument of zero means reset to default.
-showAllNodeAttributes(-saa) string edit
Display all attributes for the given node, not just primary attributes. Passing an empty string will apply this to all currently selected nodes. If no nodes are selected, this will be applied to all displayed nodes in the graph.
-showNamespace(-sn) boolean createqueryedit
Specifies whether nodes will have their namespace displayed if they are not in the root namespace.
-showShapes(-ss) boolean createqueryedit
Show shape nodes.
-showSGShapes(-ssg) boolean createqueryedit
Show shapes which are connected to the network through a shading group.
-showTransforms(-st) boolean createqueryedit
Show transforms.
-extendToShapes(-ets) boolean createqueryedit
Include child shapes for each selected transform.
-feedbackConnection(-fbc) query
Returns a description of the feedback connection(s) in the editor view, if any. The connection(s) will be returned as a list of strings, which are pairs of plugs for each connection.
-feedbackNode(-fbn) query
Returns the name of the feedback node in the editor view, if any.
-feedbackPlug(-fbp) query
Returns the name of the feedback plug (attribute) in the editor view, if any.
-feedbackType(-fbt) query
Returns the most specific type of the feedback item in the editor view, if any. Will be one of "plug", "node", "connection" or an empty string. Use the other feedback* flags to query the item description.
-hudMessage(-hm) string int float edit
Display the given message on the editor HUD. The flag arguments are (message, type, duration), where type is:
  1. upper-left corner.
  2. top center.
  3. upper-right corner.
Duration 0 means the message stays until removed. Duration > 0 means it stays for that number of seconds.
An empty message erases whatever is currently displayed for the given type.
-removeNode(-rem) string editmultiuse
Removes a node from the graph. An empty string indicates that currently selected nodes should be removed.
-removeUnselected(-run) edit
Removes unselected nodes from graph.
-removeUpstream(-ru) edit
Removes all items upstream to the currently active selection.
-removeDownstream(-rd) edit
Removes all items downstream to the currently active selection.
-renameNode(-ren) string edit
Rename a node in the graph. Depending on the zoom level of the view, an edit field will either appear on the node item or in a popup dialog to allow the new name to be entered.
-restoreInfo(-ri) string createedit
Restores the editor state corresponding to supplied hyperGraphInfo node.
-createInfo(-ci) string createedit
Creates or modifies a hyperGraphInfo network to save the state of the editor.
-deleteSelected(-del) edit
Delete the selected nodes and break the selected connections.
-keyPressCommand(-kpc) script createqueryedit
Specifies a function to be called when a key is pressed and the editor has focus.

The function will be passed the name of the editor and an (uppercase) string representation of the key that was pressed, and should return true if the key was handled, and false if it was not.

Note: `getModifiers` can be used to query the current state of key modifiers.
-keyReleaseCommand(-krc) script createqueryedit
Specifies a function to be called when a key is released and the editor has focus.

The function will be passed the name of the editor and an (uppercase) string representation of the key that was released, and should return true if the key was handled, and false if it was not.

Note: `getModifiers` can be used to query the current state of key modifiers.
-nodeViewMode(-nvm) string edit
Sets the attribute view mode of selected nodes in the active scene. Mode values are: "simple" (no attributes displayed), "connected" (connected attributes only), and "all" (all interesting attributes displayed).
-nodeTitleMode(-ntm) string createqueryedit
Gets/sets the node title display mode of the current scene. Mode values are: "name" (Display node names), "type" (Display node types), "none" (Do not display titles)
-panView(-pv) float float edit
Pan the view by the given amount. Arguments of 0 0 will reset the view translation.
-settingsChangedCallback(-scc) script createqueryedit
Specifies a function to be called whenever settings for the node editor get changed.
-toggleSwatchSize(-tss) string edit
Toggles the swatch size of the given node between small and large. If supplied node name was empty, this will be applied to selection, and if no nodes are selected this is applied to all nodes in editor. When selection is a combination of small and large swatch sizes, this will set selection to large swatch mode.
-pinSelectedNodes(-psn) boolean edit
Pins or unpins the selected nodes. If no nodes are selected, this will apply to all displayed nodes.
-toggleSelectedPins(-tsp) boolean edit
Toggles pinned state on selected nodes. If any selected nodes are unpinned, this operation will choose to pin all nodes. If no nodes are selected, this will apply to all displayed nodes.
-shaderNetworks(-sns) edit
Graph the shader network for all the objects on the selection list that have shaders.
-breakSelectedConnections(-bsc) edit
Break the selected attribute connections.
-graphSelectedConnections(-gsc) edit
Graph the nodes connected by the selected attribute connections.
-selectConnectionNodes(-scn) edit
Select the nodes connected by the selected attribute connections.
-selectFeedbackConnection(-sfc) edit
Select the feedback connection(s) in the editor view, if any.
-additiveGraphingMode(-agm) boolean createqueryedit
When enabled the graphing will add node networks to the existing graph instead of replacing it.
-defaultPinnedState(-dps) boolean createqueryedit
Sets default pinned state of all nodes, 1 for pinned, 0 for unpinned. default value 0
-getNodeList(-gnl) query
Returns a list of all nodes displayed in the editor.
-gridVisibility(-gv) boolean createqueryedit
Toggle grid visiblity on/off.
-gridSnap(-gs) boolean createqueryedit
Toggle grid snapping on/off.

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

window;
string $form = `formLayout`;
string $p = `scriptedPanel -type nodeEditorPanel -label "Node Editor"`;
formLayout -e
    -af $p "top" 0 -af $p "bottom" 0 -af $p "left" 0 -af $p "right" 0 $form;
showWindow;