Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

mirrorJoint( object , [mirrorBehavior=boolean], [mirrorXY=boolean], [mirrorXZ=boolean], [mirrorYZ=boolean], [searchReplace=[string, string]])

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

mirrorJoint is undoable, NOT queryable, and NOT editable.

This command will duplicate a branch of the skeleton from the selected joint symmetrically about a plane in world space. There are three mirroring modes(xy-, yz-, xz-plane).

Return value

string[]Names of the mirrored joints

Related

connectJoint, ikHandle, ikHandleDisplayScale, ikSolver, ikSystem, ikSystemInfo, insertJoint, joint, jointCluster, jointDisplayScale, jointLattice, removeJoint, removeJoint

Flags

mirrorBehavior, mirrorXY, mirrorXZ, mirrorYZ, searchReplace
Long name (short name) Argument types Properties
mirrorXY(mxy) boolean create
mirror skeleton from the selected joint about xy-plane in world space.
mirrorYZ(myz) boolean create
mirror skeleton from the selected joint about yz-plane in world space.
mirrorXZ(mxz) boolean create
mirror skeleton from the selected joint about xz-plane in world space.
mirrorBehavior(mb) boolean create
The mirrorBehavior flag is used to specify that when performing the mirror, the joint orientation axes should be mirrored such that equal rotations on the original and mirrored joints will place the skeleton in a mirrored position (symmetric across the mirroring plane). Thus, animation curves from the original joints can be copied to the mirrored side to produce a similar (but symmetric) behavior. When mirrorBehavior is not specified, the joint orientation on the mirrored side will be identical to the source side.
searchReplace(sr) [string, string] create
After performing the mirror, rename the new joints by searching the name for the first specified string and replacing it with the second specified string.

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.

Python examples

import maya.cmds as cmds

# Create a mirrored branch of the skeleton starting from the joint "jointName"
# about the yz-plane.
# Joint orientations on the mirrored side will be identical to the source side.
#
cmds.mirrorJoint( 'jointName' )
# Create a mirrored branch of the skeleton starting from the joint "jointName"
# about the yz-plane.
# Joint orientations on the mirrored side will be mirrored from the source side.
#
cmds.mirrorJoint('jointName',mirrorBehavior=True,myz=True)
# Create a mirrored branch of the skeleton starting from the selected joint
# about the xy-plane.
# Joint orientations on the mirrored side will be mirrored from the source side.
# Joint names on the duplicated side will contain the string "right_" if
# the corresponding joint on the original side contained the string "left_".
#
cmds.mirrorJoint(mirrorXY=True,mirrorBehavior=True,searchReplace=('left_', 'right_') )