pymel.core.windows.nodeEditor

nodeEditor(*args, **kwargs)

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

Flags:
Long name (short name) Argument Types Properties
addNewNodes (ann) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
New nodes should be added to the graph, default is on.
addNode (an) unicode ../../../_images/edit.gif
 
Adds a specified node to the graph. Passing an empty string means the current model selection will be added to the graph.
additiveGraphingMode (agm) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When enabled the graphing will add node networks to the existing graph instead of replacing it.
allAttributes (ala) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Attributes should not be filtered out of the graph, default is off.
allNodes (aln) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Nodes should not be filtered out of the graph, default is off.
beginNewConnection (bnc) unicode ../../../_images/edit.gif
 
Begin a new interactive connection at the given attribute.
| .. |
bsc)** | bool | .. image:: /images/edit.gif |
 
Break the selected attribute connections.
control (ctl) bool ../../../_images/query.gif
 

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.

createInfo (ci) unicode ../../../_images/create.gif ../../../_images/edit.gif
 
Creates or modifies a hyperGraphInfo network to save the state of the editor.
createNodeCommand (cnc) script ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 createNodeis used.

cycleHUD (ch) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Change the HUD to the next state.
defineTemplate (dt) unicode ../../../_images/create.gif
 

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.

docTag (dtg) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Attaches a tag to the Maya editor.
dotFormat (dot) unicode ../../../_images/query.gif ../../../_images/edit.gif
 

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 plainformat. 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.

downstream (ds) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Include nodes which are downstream of the root nodes.
exists (ex) bool ../../../_images/create.gif
 
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
extendToShapes (ets) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Include child shapes for each selected transform.
feedbackConnection (fbc) bool ../../../_images/query.gif
 

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) bool ../../../_images/query.gif
 
Returns the name of the feedback node in the editor view, if any.
feedbackPlug (fbp) bool ../../../_images/query.gif
 
Returns the name of the feedback plug (attribute) in the editor view, if any.
feedbackType (fbt) bool ../../../_images/query.gif
 

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.

filter (f) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
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.
filterCreateNodeTypes (fcn) script ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

forceMainConnection (fmc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

frameAll (fa) bool ../../../_images/edit.gif
 
Frame all the contents of the node editor.
frameModelSelection (fms) bool ../../../_images/edit.gif
 
Frame the current model selection.
frameSelected (fs) bool ../../../_images/edit.gif
 
Frame the selected contents of the node editor.
| .. |
gsc)** | bool | .. image:: /images/edit.gif |
 
Graph the nodes connected by the selected attribute connections.
highlightConnection (hlc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

hudMessage (hm) unicode, int, float ../../../_images/edit.gif
 

Display the given message on the editor HUD. The flag arguments are (message, type, duration), where type is:upper-left corner.top center.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.

ignoreAssets (ia) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Do not display asset contents as subgraphs, instead show asset-related nodes as normal nodes, default is off.
island (isl) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Graph DG islands instead of dependency nodes.
layout (lay) bool ../../../_images/edit.gif
 
Perform an automatic layout of the graph.
layoutCommand (lc) script ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

lockMainConnection (lck) bool ../../../_images/create.gif ../../../_images/edit.gif
 

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.

mainListConnection (mlc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

nodeViewMode (nvm) unicode ../../../_images/edit.gif
 

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).

panView (pv) float, float ../../../_images/edit.gif
 
Pan the view by the given amount. Arguments of 0 0 will reset the view translation.
panel (pnl) unicode ../../../_images/create.gif ../../../_images/query.gif
 

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) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the parent layout for this editor. This flag will only have an effect if the editor is currently un-parented.
pinSelectedNodes (psn) bool ../../../_images/edit.gif
 
Pins or unpins the selected nodes.
popupMenuScript (pms) script ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

removeNode (rem) unicode ../../../_images/edit.gif
 
Removes a node from the graph. An empty string indicates that currently selected nodes should be removed.
renameNode (ren) unicode ../../../_images/edit.gif
 

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) unicode ../../../_images/create.gif ../../../_images/edit.gif
 
Restores the editor state corresponding to supplied hyperGraphInfo node.
rootNode (rn) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
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) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Specify that the root nodes for the graph should taken from the currently active selection.
scaleView (sv) float ../../../_images/edit.gif
 
Scales the graph view by the given factor. An argument of zero means reset to default.
selectAll (sa) bool ../../../_images/edit.gif
 
Select all items in the graph.
selectConnectionNodes (scn) bool ../../../_images/edit.gif
 
Select the nodes connected by the selected attribute connections.
| .. |
sfc)** | bool | .. image:: /images/edit.gif |
 
Select the feedback connection(s) in the editor view, if any.
selectNode (sln) unicode ../../../_images/query.gif ../../../_images/edit.gif
 
Select a node in the graph. Passing an empty string clears the current selection. When queried, returns the list of currently selected nodes.
selectionConnection (slc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

setAsDefaultWidth (sdw) unicode ../../../_images/edit.gif
 

Sets the size of the given node (in node editor) as the defaultFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

| .. |
scc)** | script | .. image:: /images/create.gif |
| | .. image:: /images/query.gif |
| | .. image:: /images/edit.gif |
 
Specifies a function to be called whenever settings for the node editor get changed.
shaderNetworks (sn) bool ../../../_images/edit.gif
 
Graph the shader network for all the objects on the selection list that have shaders.
showAllNodeAttributes (saa) unicode ../../../_images/edit.gif
 
Display all attributes for the given node, not just primary attributes.
showSGShapes (ssg) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Show shapes which are connected to the network through a shading group.
showShapes (ss) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Show shape nodes.
showTransforms (st) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Show transforms.
stateString (sts) bool ../../../_images/query.gif
 

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.

syncedSelection (ssl) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Keep the graph selection in sync with the model selection.
toggleSwatchSize (tss) unicode ../../../_images/edit.gif
 
Toggles the swatch size of the given node between small and large.
toolTipCommand (ttc) script ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
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.
unParent (up) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Specifies that the editor should be removed from its layout. This cannot be used with query.
unlockMainConnection (ulk) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Unlocks the mainConnection, effectively restoring the original mainConnection (if it is still available), and dynamic updates.
updateMainConnection (upd) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Causes a locked mainConnection to be updated from the orginal mainConnection, but preserves the lock state.
upstream (ups) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Include nodes which are upstream of the root nodes.
useTemplate (ut) unicode ../../../_images/create.gif
 
Force the command to use a command template other than the current one.

Derived from mel command maya.cmds.nodeEditor

Example:

import pymel.core as pm

import maya.cmds as cmds

pm.window()
# Result: ui.Window('window1') #
form = pm.formLayout()
p = pm.scriptedPanel(type="nodeEditorPanel", label="Node Editor")
pm.formLayout(form, e=True, af=[(p,s,0) for s in ("top","bottom","left","right")])
# Result: ui.FormLayout('window1|formLayout60') #
pm.showWindow()

Previous topic

pymel.core.windows.nameField

Next topic

pymel.core.windows.nodeIconButton

Core

Core Modules

Other Modules

This Page