Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
dgdirty([allPlugs=boolean], [clean=boolean], [implicit=boolean], [list=string], [propagation=boolean], [showTiming=boolean], [verbose=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
dgdirty is NOT undoable, queryable, and NOT editable.
The dgdirty command is used to force a dependency graph
dirty message on a node or plug. Used for debugging to find
evaluation problems. If no nodes are specified then the current
selection list is used.
If the list flag is used it will return the list of things
currently marked as dirty (or clean if the clean flag was
also used). The returned values will be the names of plugs either
clean/dirty themselves, at both ends of a clean/dirty connection,
or representing the location of clean/dirty data on the node.
Be careful using this option in conjunction with
the all flag, the list could be huge.
string[] | List of dirty/clean plugs in list plug mode. |
string[] | List of plugs with dirty/clean data in list data mode. |
string[] | Pairs of dirty/clean connected plugs in list connection mode. |
int | Number of dirty/clean messages sent out in normal mode. |
In query mode, return type is based on queried flag.
dg, dependency, graph, dirty, plug, state
dbpeek, dgInfo, dgeval
allPlugs, clean, implicit, list, propagation, showTiming, verbose
Long name (short name) |
Argument types |
Properties |
allPlugs(a)
|
boolean
|
|
|
Ignore the selected or specified objects and dirty (or clean)
all plugs.
|
|
clean(c)
|
boolean
|
|
|
If this flag is set then the attributes are cleaned. Otherwise
they are set to dirty.
|
|
implicit(i)
|
boolean
|
|
|
If this flag is set then allow the implicit or default nodes to be
processed as well. Otherwise they will be skipped for efficiency.
|
|
list(l)
|
string
|
|
|
When this flag is specified then instead of sending out dirty/clean
messages the list of currently dirty/clean objects will be returned.
The allPlugs and clean flags are respected to narrow
guide the values to be returned.
The value of the flag tells what will be reported.
- "data" or "d" = show plugs that have dirty/clean data
- "plug" or "p" = show plugs that have dirty/clean states
- "connection" or "c" = show plugs with connections that have dirty/clean states
Query this flag to find all legal values of the flag. Query this flag with
its value already set to get a description of what that value means.
Note that "p" and "c" modes are restricted to plugs that have connections
or non-standard state information. Other attributes will not have state
information to check, though they will have data.
In the case of array attributes only the children that have values
currently set will be considered. No attempt will be made to evaluate
them in order to update the available child lists.
e.g. if you have a DAG with transform T1 and shape S1 the instanced
attribute S1.wm[0] will be reported. If in a script you create a second
instance T2->S1 and immediately list the plugs again before evaluation
you will still only see S1.wm[0]. The new S1.wm[1] won't be reported
until it is created through an evaluation, usually caused by refresh,
a specific getAttr command, or an editor update.
Note that the list is only for selected nodes. Unlike when dirty
messages are sent this does not travel downstream.
|
|
propagation(p)
|
boolean
|
|
|
If this flag is set then the ability of dirty messages to flow through
the graph is left enabled.
|
|
showTiming(st)
|
boolean
|
|
|
If this flag is used then show how long the dirty messages took
to propagate.
|
|
verbose(v)
|
boolean
|
|
|
Prints out all of the plugs being set dirty on stdout.
|
|
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.
|
import maya.cmds as cmds
# Set everything in the entire scene dirty
#
cmds.dgdirty(allPlugs=True);
# Result: 123 #
# Set all connected plugs dirty on "myNode"
# 5 plugs were set dirty
#
cmds.dgdirty( 'myNode' )
# Result: 5 #
# Set all connected plugs dirty on "locator1"
# 0 plugs were connected so no dirty message was sent
#
cmds.dgdirty( 'locator1' )
# Result: 0 #
# Set myNode.tx dirty
cmds.select( 'myNode.tx' )
cmds.dgdirty()
# Result: 1 #
# Show the dirty elements in the node
cmds.dgdirty( list='data' )
# Result: [myNode.tx] #
# Show plugs with dirty state, if any
cmds.dgdirty( list='plug' )
# Result: [myNode.tx, myNode.ty] #
# Show plugs with dirty connections, if any
cmds.dgdirty( list='connection' )
# Result: [myNode.ty] #
# Show the types of list parameters available
cmds.dgdirty( query=True, list=True )
# Result: ['d/data', 'p/plug', 'c/connection']
# Show the types of list parameters available with timing
cmds.dgdirty( query=True, list=True, showTiming=True )
# Messages took 8 microseconds to process.
# Result: ['d/data', 'p/plug', 'c/connection']