dagObjectCompare can be used to compare to compare objects based on: type - Currently supports transform nodes and shape nodesrelatives - Compares DAG objects’ children and parentsconnections - Checks to make sure the two dags are connected to the same sources and destinationsattributes - Checks to make sure that the properties of active attributes are the same
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
attribute (a) | bool | ||
|
|||
bail (b) | unicode | ||
|
|||
connection (c) | bool | ||
|
|||
namespace (n) | unicode | ||
|
|||
relative (r) | bool | ||
|
|||
short (s) | bool | ||
|
|||
type (t) | bool | ||
|
Derived from mel command maya.cmds.dagObjectCompare
Example:
import pymel.core as pm
import maya.cmds as cmds
# Compare two objects based on type and their relatives where one is in the namespace "base":
pm.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:
pm.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:
pm.dagObjectCompare( t=True, r=True, c=True, a=True, b=True, category=True, n="base")