pymel.core.animation.clipMatching

clipMatching(*args, **kwargs)

This command is used to compute an offset to apply on a source clip in order to automatically align it to a destination clip at a specified match element. For this command to work, offset objects must be specified for the character.

Flags:

Long Name / Short Name Argument Types Properties
clipDst / cd unicode, float ../../../_images/create.gif
  The clip to match so that the source clip can be offsetted correctly. This flag takes in a clip name and the percentage value ranging from 0.0 to 1.0 in order to have the source clip match at a certain time in the destination clip.
clipSrc / cs unicode, float ../../../_images/create.gif
  The clip to offset so that it aligns with the destination clip. This flag takes in a clip name and the percentage value ranging from 0.0 to 1.0 in order to have it match at a certain time in the clip.
matchRotation / mr int ../../../_images/create.gif
  This flag sets the rotation match type. By default, it is set to not match the rotation. 0 - None 1 - Match full rotation 2 - Match projected rotation on ground plane
matchTranslation / mt int ../../../_images/create.gif
  This flag sets the translation match type. By default, it is set to not match the translation. 0 - None 1 - Match full translation 2 - Match projected translation on ground plane Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.clipMatching

Example:

import pymel.core as pm

# Compute and set the offset on the "walk" clip in order to have it's start
# pose align to the end of the "tornadoKick" clip at the LeftAnkle match
# element.  Note that here we are matching the translation by specifying
# with mt = 1.
#
pm.select( 'character', 'LeftAnkle' )
pm.clipMatching( mt=1, cs=("walk",0.0), cd=("tornadoKick",1.0) )