Go to: Synopsis. Return value. Related. Flags. Python examples.
isDirty(
<plug>
, [connection=boolean], [datablock=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
isDirty is undoable, queryable, and editable.
The isDirty command is used to check if a plug is dirty. connected in the dependency graph. The return value is 0 if it is not and 1 if it is. If more than one plug is specified then the result is the logical "or" of all objects (ie. returns 1 if *any* of the plugs are dirty).boolean : Is the plug dirty? If more than one plug is given then it returns the logical "and" of all dirty states.
In query mode, return type is based on queried flag.
Long name (short name) | argument types | Properties | ||
---|---|---|---|---|
datablock(d)
|
boolean
|
![]() |
||
|
||||
connection(c)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds cmds.sphere( n='sun' ) # Check connection of sun.tx cmds.isDirty( 'sun.tx' ) # Return: 0 # # Check datablock of sun.tx cmds.isDirty( 'sun.tx', d=True ) # Return: 0 # # Check datablock and connection. # Returns logical "and" of both. cmds.isDirty( 'sun.tx', d=True, c=True ) # Return: 0 #