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 ../../../_images/create.gif
  Compare dag object attributes
bail / b unicode ../../../_images/create.gif
  Bail on first error or bail on category. Legal values are never, first, and category.
connection / c bool ../../../_images/create.gif
  Compare dag connections
namespace / n unicode ../../../_images/create.gif
  The baseline namespace
relative / r bool ../../../_images/create.gif
  dag relatives
short / s bool ../../../_images/create.gif
  Compress output to short form (not as verbose)
type / t bool ../../../_images/create.gif
  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")