Your Ad Here

Go to: Synopsis. Return value. Python examples.

Synopsis

transformCompare( [transform1 transform2] )

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

transformCompare is undoable, queryable, and editable.

Compares two transforms. If they are the same, returns 0. If they are different, returns 1. If no transforms are specified in the command line, then the transforms from the active list are used.

Return value


0 if successful, 1 if transform1 and transform2 are not determined to be equal.

Python examples

import maya.cmds as cmds

# Create some joints
#
cmds.select( d=True )
cmds.joint( p=(-3.226531, 0, -4.866136) )
cmds.joint( p=(2.817897, 0, -4.016915) )
cmds.joint( 'joint1', e=True, zso=True, oj='xyz', sao='yup' )

# Compare 2 different joints, a 1 will be returned
#
cmds.select( 'joint1', 'joint2', r=True )
cmds.transformCompare()

# Duplicate joint1 and compare the duplicate
#
cmds.select( 'joint1', r=True )
cmds.duplicate()
cmds.select( cl=True )
cmds.select( 'joint1', 'joint3', r=True )
cmds.transformCompare()

  

Return to Autodesk Index


Your Ad Here