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

Synopsis

combinationShape([addDriver=boolean], [allDrivers=boolean], [blendShape=string], [combinationTargetIndex=int], [combinationTargetName=string], [combineMethod=int], [driverTargetIndex=int], [driverTargetName=string], [exist=boolean], [removeDriver=boolean])

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

combinationShape is undoable, queryable, and editable.

Command to create or edit drive relationship of blend shape targets

Return value

IntIn edit mode, return the newly created combination shape node name.

In query mode, return type is based on queried flag.

Keywords

combination, target

Flags

addDriver, allDrivers, blendShape, combinationTargetIndex, combinationTargetName, combineMethod, driverTargetIndex, driverTargetName, exist, removeDriver
Long name (short name) Argument types Properties
addDriver(add) boolean
Add drivers to the combination shape
allDrivers(ald) boolean query
All drivers of the combination shape
blendShape(bs) string create
Associated blend shape node of the combination shape

In query mode, this flag can accept a value.

combinationTargetIndex(cti) int create
Driven blend shape target index of the combination shape

In query mode, this flag can accept a value.

combinationTargetName(ctn) string create
Driven blend shape target name of the combination shape

In query mode, this flag can accept a value.

combineMethod(cm) int createqueryedit
Combine method of the combination shape:
  • 0 : Multiplication
  • 1 : Lowest Weighting
  • 2 : Lowest Weighting (Smooth)
driverTargetIndex(dti) int createmultiuse
Driver blend shape target index of the combination shape
driverTargetName(dtn) string createmultiuse
Driver blend shape target name of the combination shape
exist(ex) boolean query
If the combination shape exist
removeDriver(rmd) boolean
Remove drivers from the combination shape

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


import maya.cmds as cmds

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

# Add two blend shape targets as drivers to a blend shape combination target, using target names.
#
cmds.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.
#
cmds.combinationShape(edit='1', blendShape='blendShape1', combinationTargetIndex=1, removeDriver=1, driverTargetName='TargetB', driverTargetIndex=2;

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

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

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