Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

dgInfo([allNodes=boolean], [connections=boolean], [dirty=boolean], [nodes=boolean], [nonDeletable=boolean], [outputFile=string], [propagation=boolean], [short=boolean], [size=boolean], [subgraph=boolean], [type=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

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

This command prints information about the DG in plain text. The scope of the information printed is the entire graph if the all flag is used, the nodes/plugs on the command line if they were specified, and the selection list, in that order. Each plug on a connection will have two pieces of state information displayed together at the end of the line on which they are printed. There are two possible values for each of the two states displayed. The values are updated when the DG pulls data across them, usually through evaluation, or pushes a dirty message through them. There are some subtleties in how the data is pulled through the connection but for simplicity it will be referred to as "evaluation". The values displayed will be CLEAN or DIRTY followed by PROP or BLOCK. The first keyword has these meanings:
  1. CLEAN means that evaluation of the plug's connection succeeded and no dirty messages have come through it since then. It also implies that the destination end of the connection has received the value from the source end.
  2. DIRTY means that a dirty message has passed through the plug's connection since the last time an evaluation was made on the destination side of that connection.
Note: the data on the node has its own dirty state that depends on other factors so having a clean connection doesn't necessarily mean the plug's data is clean, and vice versa. The second keyword has these meanings:
  1. PROP means that the connection will allow dirty messages to pass through and forwards them to all destinations.
  2. BLOCK means that a dirty message will stop at this connection and not continue on to any destinations. This is an optimization that prevents excessive dirty flag propagation when many values are changing, for example, a frame change in an animated sequece.
The combination CLEAN BLOCK should never be seen in a valid DG. This indicates that while the plug connection has been evaluated since the last dirty message it will not propagate any new dirty messages coming in to it. That in turn means downstream nodes will not be notified that the graph is changing and they will not evaluate properly. Recovering from this invalid state requires entering the command dgdirty -a to mark everything dirty and restart proper evaluation. Think of this command as the reset/reboot of the DG world. Both state types behave differently depending on your connection type.
  1. Simple A -> B : Plugs at both ends of the connection share the same state information. The state information updates when an evaluation request comes to A from B, or a dirty message is sent from A to B.
  2. Fan-Out A -> B, A -> C : Each of A, B, and C have their own unique state information. B and C behave as described above. A has its state information linked to B and C - it will have CLEAN only when both B and C have CLEAN, it will have BLOCK only when both B and C have BLOCK.
  3. In-Out A -> B, C -> A : Each of A, B, and C have their own unique state information. B and C behave as described above. A has its state information linked to B and C. The CLEAN|DIRTY flag looks backwards, then forwards:
    if( C == CLEAN ) A = CLEAN
    else if( B == CLEAN ) A = CLEAN
    
    The BLOCK state is set when a dirty message passes through A, and the PROP state is set either when A is set clean or an evaluation passes through A.
There are some other exceptions to these rules:
  1. All of this state change information only applies to dirty messages and evaluations that use the normal context. Any changes in other contexts, for example, through the getAttr -t TIME command, does not affect the state in the connections.
  2. Param curves and other passive inputs, for example blend nodes coming from param curves, will not disable propagation. Doing so would make the keyframing workflow impossible.
  3. Certain messages can choose to completely ignore the connection state information. For example when a node's state attribute changes a connection may change to a blocking one so the message has to be propagated at least one step further to all of its destinations. This way they can update their information.
  4. Certain operations can globally disable the use of the propagaton state to reduce message flow. The simplest example is when the evaluation manager is building its graph. It has to visit all nodes so the propagation cannot be blocked.
  5. The messaging system has safeguards against cyclic messages flowing through connections but sometimes a message bypasses the connection completely and goes directly to the node. DAG parents do this to send messages to their children. So despite connections into a node all having the BLOCK state it could still receive dirty messages.

Return value

None

Keywords

debug, dependency, graph, node, output, connection

Related

dgdirty, dgeval

Flags

allNodes, connections, dirty, nodes, nonDeletable, outputFile, propagation, short, size, subgraph, type
Long name (short name) Argument types Properties
allNodes(all) boolean create
Use the entire graph as the context
connections(c) boolean create
Print the connection information
dirty(d) boolean create
Only print dirty/clean nodes/plugs/connections. Default is both
nodes(n) boolean create
Print the specified nodes (or the entire graph if -all is used)
nonDeletable(nd) boolean create
Include non-deletable nodes as well (normally not of interest)
outputFile(of) string create
Send the output to the file FILE instead of STDERR
propagation(p) boolean create
Only print propagating/not propagating nodes/plugs/connections. Default is both.
short(s) boolean create
Print using short format instead of long
size(sz) boolean create
Show datablock sizes for all specified nodes. Return value is tuple of all selected nodes (NumberOfNodes, NumberOfDatablocks, TotalDatablockMemory)
subgraph(sub) boolean create
Print the subgraph affected by the node or plugs (or all nodes in the graph grouped in subgraphs if -all is used)
type(nt) string create
Filter output to only show nodes of type NODETYPE

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# create a node
cmds.createNode('transform',name='NODE')
cmds.setKeyframe('NODE.translate')
# Print all things connected to node NODE
cmds.dgInfo( 'NODE', c=True )
# Print all connections currently in the graph
cmds.dgInfo( c=True, all=True )
# Print the datablock size of all nodes currently in the graph
cmds.dgInfo( sz=True, all=True )
# Return: [12, 12, 12314]
# Print all connections to attribute tx on node NODE
cmds.dgInfo('NODE.tx',c=True)
# Print all dirty connections in the entire graph
cmds.dgInfo( c=True, all=True, d=True )