pymel.core.animation.combinationShape

combinationShape(*args, **kwargs)

Command to create or edit drive relationship of blend shape targets

Flags:

Long Name / Short Name Argument Types Properties
addDriver / add bool  
  Add drivers to the combination shape
allDrivers / ald bool ../../../_images/query.gif
  All drivers of the combination shape
blendShape / bs unicode ../../../_images/create.gif
  Associated blend shape node of the combination shape In query mode, this flag can accept a value.
combinationTargetIndex / cti int ../../../_images/create.gif
  Driven blend shape target index of the combination shape In query mode, this flag can accept a value.
combinationTargetName / ctn unicode ../../../_images/create.gif
  Driven blend shape target name of the combination shape In query mode, this flag can accept a value.
combineMethod / cm int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Combine method of the combination shape: 0 : Multiplication1 : Lowest Weighting2 : Lowest Weighting (Smooth)
driverTargetIndex / dti int ../../../_images/create.gif
  Driver blend shape target index of the combination shape
driverTargetName / dtn unicode ../../../_images/create.gif
  Driver blend shape target name of the combination shape
exist / ex bool ../../../_images/query.gif
  If the combination shape exist
removeDriver / rmd bool  
  Remove drivers from the combination shape Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.combinationShape

Example:

::

import pymel.core as pm

import maya.cmds as cmds

# Set a blend shape target as combination target, and another two blend shape targets as drivers, using target indexes. # pm.combinationShape(blendShape=’blendShape1’, combinationTargetIndex=1, driverTargetIndex=[2,3])

# Add two blend shape targets as drivers to a blend shape combination target, using target names. # pm.combinationShape(edit=‘1’, blendShape=’blendShape1’, combinationTargetName=’TargetA’, addDriver=1, driverTargetName=[‘TargetB’, ‘TargetC’])

# Remove two blend shape targets from drivers of a blend shape combination target. # pm.combinationShape(edit=‘1’, blendShape=’blendShape1’, combinationTargetIndex=1, removeDriver=1, driverTargetName=’TargetB’, driverTargetIndex=2;

# Change combine method of a blend shape combination target # pm.combinationShape(edit=‘1’, blendShape=’blendShape1’, combinationTargetIndex=1, combineMethod=2;

# Remove all drivers of a blend shape combination target. # pm.combinationShape(edit=‘1’, blendShape=’blendShape1’, combinationTargetIndex=1, removeDriver=1, allDrivers=1)

# Query all drivers of a blend shape combination target. # pm.combinationShape(query=‘1’, blendShape=’blendShape1’, combinationTargetIndex=1, allDrivers=1)