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

Synopsis

bakeClip([blend=[uint, uint]], [clipIndex=uint], [keepOriginals=boolean], [name=string])

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

bakeClip is undoable, NOT queryable, and NOT editable.

This command is used to bake clips and blends into a single clip.

Return value

stringclip name

Keywords

character, clip, blend, animation, bake

Related

clip, clipSchedule

Flags

blend, clipIndex, keepOriginals, name
Long name (short name) Argument types Properties
clipIndex(ci) uint createmultiuse
Specify the index of the clip to bake.
blend(b) [uint, uint] create
Specify the indicies of the clips being blended.
name(n) string create
Specify the name of the new clip to create.
keepOriginals(k) boolean create
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 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

#    First create a simple character.
#
cmds.cone( n='bakeCone' )
cmds.character( n='coneCharacter' )
#    Create some animation.
#
cmds.select( 'bakeCone', r=True )
cmds.currentTime( 0 )
cmds.setKeyframe( 'bakeCone.tx', v=0 )
cmds.currentTime( 10 )
cmds.setKeyframe( 'bakeCone.tx', v=10 )
#     Make a clip.
#
cmds.clip( 'coneCharacter', startTime=0, endTime=10, name='up' )
#    Create a second clip.
#
cmds.select( 'bakeCone', r=True )
cmds.currentTime( 15 )
cmds.setKeyframe( 'bakeCone.tx', v=15 )
cmds.currentTime( 25 )
cmds.setKeyframe( 'bakeCone.tx', v=0 )
# Make a clip.
#
cmds.clip( 'coneCharacter', startTime=15, endTime=25, name='down' )
# Blend the clips, with a linear weighting function.
#
scheduler = cmds.character('coneCharacter', query=True, sc=True)
cmds.clipSchedule( scheduler, b=(0, 1) )
blendNode = cmds.clipSchedule( scheduler, q=True, bn=(0, 1))
cmds.setKeyframe( blendNode[0], at='weight', t=0.0, v=0.0 )
cmds.setKeyframe( blendNode[0], at='weight', t=1.0, v=1.0 )
#    Bake out the two clips and the blend.
#
cmds.bakeClip( 'coneCharacter', ci=[0, 1], name='bakedUpAndDown' )