This command is used to bake clips and blends into a single clip.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
blend (b) | int, int | ||
|
|||
clipIndex (ci) | int | ||
|
|||
keepOriginals (k) | bool | ||
Keep original clips in the trax editor and place the merged clip into the visor. The default is to schedule the merged clip, and to keep the original clips in the visor.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
name (n) | unicode | ||
|
Derived from mel command maya.cmds.bakeClip
Example:
import pymel.core as pm
# First create a simple character.
#
pm.cone( n='bakeCone' )
# Result: [nt.Transform(u'bakeCone'), nt.MakeNurbCone(u'makeNurbCone1')] #
pm.character( n='coneCharacter' )
# Result: nt.Character(u'coneCharacter') #
# Create some animation.
#
pm.select( 'bakeCone', r=True )
pm.currentTime( 0 )
# Result: 0.0 #
pm.setKeyframe( 'bakeCone.tx', v=0 )
# Result: 1 #
pm.currentTime( 10 )
# Result: 10.0 #
pm.setKeyframe( 'bakeCone.tx', v=10 )
# Result: 1 #
# Make a clip.
#
pm.clip( 'coneCharacter', startTime=0, endTime=10, name='up' )
# Result: [u'up'] #
# Create a second clip.
#
pm.select( 'bakeCone', r=True )
pm.currentTime( 15 )
# Result: 15.0 #
pm.setKeyframe( 'bakeCone.tx', v=15 )
# Result: 1 #
pm.currentTime( 25 )
# Result: 25.0 #
pm.setKeyframe( 'bakeCone.tx', v=0 )
# Result: 1 #
# Make a clip.
#
pm.clip( 'coneCharacter', startTime=15, endTime=25, name='down' )
# Result: [u'down'] #
# Blend the clips, with a linear weighting function.
#
scheduler = pm.character('coneCharacter', query=True, sc=True)
pm.clipSchedule( scheduler, b=(0, 1) )
blendNode = pm.clipSchedule( scheduler, q=True, bn=(0, 1))
pm.setKeyframe( blendNode[0], at='weight', t=0.0, v=0.0 )
# Result: 1 #
pm.setKeyframe( blendNode[0], at='weight', t=1.0, v=1.0 )
# Result: 1 #
# Bake out the two clips and the blend.
#
pm.bakeClip( 'coneCharacter', ci=[0, 1], name='bakedUpAndDown' )
# Result: u'bakedUpAndDown1' #