pymel.core.system.dagObjectCompare¶
- dagObjectCompare(*args, **kwargs)¶
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
Flags:
Long Name / Short Name Argument Types Properties attribute / a bool Compare dag object attributes bail / b unicode Bail on first error or bail on category. Legal values are never, first, and category. connection / c bool Compare dag connections namespace / n unicode The baseline namespace relative / r bool dag relatives short / s bool Compress output to short form (not as verbose) type / t bool Compare based on dag object type Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.dagObjectCompare
Example:
import pymel.core as pm # 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")