The dgdirtycommand 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. When the listflag is specified it will return the list of plugs, data, or connections that are currently marked as dirty. Be careful using this option in conjunction with the allflag, the list could be huge.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
allPlugs (a) | bool | ![]() |
|
|
|||
clean (c) | bool | ![]() |
|
|
|||
list (l) | unicode | ![]() |
|
When this flag is specified then instead of sending out dirty/clean messages the list of currently dirty/clean objects will be returned. The allPlugsand cleanflags are respected to narrow guide the values to be returned. The value of the flag tells what will be reported. dataor d= show plugs that have dirty/clean dataplugor p= show plugs that have dirty/clean statesconnectionor c= show plugs with connections that have dirty/clean statesNote that pand cmodes 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) | bool | ![]() |
|
If this flag is set then the ability of dirty messages to flow through the graph is left enabled. Otherwise the dirty states are set and further message propagation is blocked. |
|||
verbose (v) | bool | ![]() |
|
|
Derived from mel command maya.cmds.dgdirty
Example:
import pymel.core as pm
# Set everything in the entire scene dirty
#
pm.dgdirty(a=True);
# Set all connected plugs dirty on "myNode"
#
pm.dgdirty( 'myNode' )
# Result: 5
# 5 plugs were set dirty
# Set all connected plugs dirty on "locator1"
pm.dgdirty( 'locator1' )
# Result: 0
# 0 plugs were connected so no dirty message was sent
# Set myNode.tx dirty
pm.select( 'myNode.tx' )
pm.dgdirty()
# Result: 1