Go to: Synopsis. Return value. Keywords. Related. Python examples.
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
setKeyframeBlendshapeTargetWts is undoable, NOT queryable, and NOT editable.This command can be used to keyframe per-point blendshape target weights. It operates on the currently selected objects as follows. When the base object is selected, then the target weights are keyed for all targets. When only target shapes are selected, then the weights for thoses targets are keyframed.
|int||number of vertices for which the targets weights are keyed|
import maya.cmds as cmds # first create a blendShape # cmds.polySphere() cmds.duplicate() cmds.duplicate() cmds.select( 'pSphere2', 'pSphere1', 'pSphere3', r=True ) cmds.blendShape() # Select one of the targets, and key its per-point weights. # Typically this would be done after painting per-point weights # for the target. # cmds.select( 'pSphere2', r=True ) cmds.setKeyframeBlendshapeTargetWts()