Go to: Synopsis. Return value. Keywords. Flags. Python examples.
dagObjectCompare([attribute=boolean], [bail=string], [connection=boolean], [namespace=string], [relative=boolean], [short=boolean], [type=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
dagObjectCompare is NOT undoable, NOT queryable, and NOT editable.
dagObjectCompare can be used to compare to compare objects based on:
- type - Currently supports transform nodes and shape nodes
- relatives - Compares DAG objects' children and parents
- connections - Checks to make sure the two dags are connected to the same sources and destinations
- attributes - Checks to make sure that the properties of active attributes are the same
None
dag, compare
attribute, bail, connection, namespace, relative, short, type
Long name (short name) |
Argument types |
Properties |
attribute(a)
|
boolean
|
|
|
Compare dag object attributes
|
|
bail(b)
|
string
|
|
|
Bail on first error or bail on category. Legal values are
"never", "first", and "category".
|
|
connection(c)
|
boolean
|
|
|
namespace(n)
|
string
|
|
|
relative(r)
|
boolean
|
|
|
short(s)
|
boolean
|
|
|
Compress output to short form (not as verbose)
|
|
type(t)
|
boolean
|
|
|
Compare based on dag object type
|
|
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
# Compare two objects based on type and their relatives where one is in the namespace "base":
cmds.dagObjectCompare( t=True, r=True, n="base" )
# Compare two objects based on their connections and attributes where one is in the namespace "base" , break on first error:
cmds.dagObjectCompare( c=True, a=True, b="first")
# Compare two objects based on their type, connections, attributes, relatives and break on error while finishing current category:
cmds.dagObjectCompare( t=True, r=True, c=True, a=True, b=True, category=True, n="base")