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

Synopsis

defaultNavigation [-connectToExisting] [-createNew] [-defaultAttribute] [-defaultTraversal] [-defaultWorkingNode] [-delete] [-destination name] [-disconnect] [-force boolean] [-ignore] [-navigatorDecisionString string] [-quiet boolean] [-relatedNodes] [-source name] [-unignore]

defaultNavigation is undoable, NOT queryable, and NOT editable.

The defaultNavigation command defines default behaviours when creating or manipulating connections between nodes and when navigating between nodes via those connections. This command is primarily used by attribute editors.

Return value

stringor array of strings

Flags

connectToExisting, createNew, defaultAttribute, defaultTraversal, defaultWorkingNode, delete, destination, disconnect, force, ignore, navigatorDecisionString, quiet, relatedNodes, source, unignore
Long name (short name) Argument types Properties
-connectToExisting(-ce) create
Connect the destination (which is a node.attribute or simply node) to an existing source. If the source is specified (as node.attribute or simply as node), the command will proceed immediately. If the source is not specified, the user will be prompted to specify one. Once a source has been specified, a best guess will be made about what the user is trying to accomplish by connecting the two, based on the type of source and type of destination. The command will connect the nodes/attributes according to the best guess. The destination is specified using the destination flag and the source specified using the source flag.
-createNew(-cn) create
Create a new node and connect it to the node.attribute specified using the destination flag.
-defaultAttribute(-da) create
Returns the name of the attribute to which a connectNodeToNode would connect, given the source (attribute) and destination (node) flags. Returns a string.
-defaultTraversal(-dtv) create
Returns the name of the node to which it would make the most sense to navigate to from the destination node.attribute specified. The destination is specified using the destination flag. Returns a string.
-defaultWorkingNode(-dwn) create
Returns the name of the node which the user is most likely to want to work with if they are interested in the attributes of the destination node. The destination is specified using the destination flag. Returns a string.
-delete(-del) create
Delete nodes with connections flowing into the node.attribute specified by the destination flag.
-destination(-d) name create
Specifies an existing destination attribute for a createNew or connectToExisting.
-disconnect(-dis) create
If used then disconnect the destination if it exists.
-force(-f) boolean create
If set to true, then an attempt to connect a source attribute to a destination attribute which already has a source will cause the existing source to be disconnected and the new source to be connected in its place. Default value is true.
-ignore(-i) create
Ignore any connections flowing into the node.attribute specified by the destination flag.
-navigatorDecisionString(-nds) string create
This is your opportunity to pass the navigator a string that can help it decide what behaviour to execute.
-quiet(-qt) boolean create
If set to true, then under no circumstances should the user be prompted for more information. Default value is false.
-relatedNodes(-ren) create
List nodes which are conceptually related to the node.attribute specified by the destination. Related nodes may include, but are not limited to, nodes which are directly or indirectly connected to the destination. The destination is specified using the destination flag. Returns an array of strings.
-source(-s) name create
Specifies an existing source attribute for a connectToExisting.
-unignore(-u) create
Stop ignoring any connections flowing into the node.attribute specified by the destination 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

// Create a poly plane
polyPlane -w 10 -h 10 -sx 10 -sy 10 -n pPlane1;

// This will open the Create Render Node window from which you can select a node that you want to connect to the existing lambert1.color attribute
defaultNavigation -createNew -destination lambert1.color;

// Select the Checker Node, you will find "checker1.outColor" is connected to "lambert1.color"

// Break the connection between "checker1.outColor" and "lambert1.color" you have just established
disconnectAttr checker1.outColor lambert1.color;

// Connect "checker1" to "lambert1". Only node is specified here, but the command will make a best guess.
// So "checker1.outColor" and "lambert1.color" are connected
defaultNavigation -connectToExisting -source checker1 -destination lambert1;