pymel.core.animation.timeEditorClipOffset¶
- timeEditorClipOffset(*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. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties applyToAllRoots / atr bool
Apply root offsets to all roots in the population. However, if the root objects are specified by rootObj flag, this flag will be ignored. clipId / id int
ID of the clip to be edited. matchClipId / mci int
Specify the ID of a clip to match. matchDstTime / mdt time
Specify the time on target clip. matchObj / mob PyNode
Specify the object to match. matchOffsetRot / mor bool
Get the rotation of the match offset matrix. matchOffsetTrans / mot bool
Get the translation of the match offset matrix. matchPath / mpt unicode
Full path of the clip to match. For example: composition1|track1|Group|track2|clip1 matchRotOp / mro int
Specify the option for matching rotation. 0 : full - All rotation components are matched1 : Y - Y component is matched2 : none - No rotation matching matchSrcTime / mst time
Specify the time on source clip. matchTransOp / mto int
Specify the option for matching translation. 0 : full - All translation components are matched1 : XZ - X and Z components are matched2 : none - No translation matching offsetTransform / oft bool
Create/get an offset for the specified clip. path / pt unicode
Full path of a clip to be edited. For example: composition1|track1|group; composition1|track1|group|track2|clip1. In query mode, this flag can accept a value. resetMatch / rsm int
Specify clip ID to remove offset. resetMatchPath / rmp unicode
Specify clip’s full path to remove offset. For example: composition1|track1|Group|track2|clip1 rootObj / rob unicode
Specify the root objects. If specified, this flag will take precedence over applyToAllRoots flag. When used in query mode, returns list of roots defined for the relocator. upVectorX / upx float
Specify the X coordinate of the up vector. upVectorY / upy float
Specify the Y coordinate of the up vector. upVectorZ / upz float
Specify the Z coordinate of the up vector. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.timeEditorClipOffset
Example:
- ::
import pymel.core as pm
# Match position and rotation # pm.timeEditorClipOffset( clipId=1, matchClipId=2, matchObj=”cube”, matchSrcTime=45, matchDstTime=45, matchTransOp=0, matchRotOp=1, applyToAllRoots=1 )
# Match position and rotation by clip paths # pm.timeEditorClipOffset( path=’composition1|track1|clip1’, matchPath=’composition1|track1|clip2’, matchObj=”cube”, matchSrcTime=45, matchDstTime=45, matchTransOp=0, matchRotOp=1, applyToAllRoots=1 )