pymel.core.nodetypes.BlendShape

digraph inheritance5892ef9c71 { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "BlendShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.nodetypes.BlendShape",style="setlinewidth(0.5)",tooltip="class counterpart of mel function `blendShape`",height=0.25,shape=box,fontsize=8]; "GeometryFilter" -> "BlendShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DependNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DependNode.html#pymel.core.nodetypes.DependNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" -> "DependNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometryFilter" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.GeometryFilter.html#pymel.core.nodetypes.GeometryFilter",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DependNode" -> "GeometryFilter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ProxyUnicode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.util.utilitytypes/pymel.util.utilitytypes.ProxyUnicode.html#pymel.util.utilitytypes.ProxyUnicode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.core.general/pymel.core.general.PyNode.html#pymel.core.general.PyNode",style="setlinewidth(0.5)",tooltip="Abstract class that is base for all pymel nodes classes.",height=0.25,shape=box,fontsize=8]; "ProxyUnicode" -> "PyNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class BlendShape(*args, **kwargs)

class counterpart of mel function blendShape

This command creates a blendShape deformer, which blends in specified amounts of each target shape to the initial base shape. Each base shape is deformed by its own set of target shapes. Every target shape has an index that associates it with one of the shape weight values.In the create mode the first item on the selection list is treated as the base and the remaining inputs as targets. If the first item on the list has multiple shapes grouped beneath it, the targets must have an identical shape hierarchy. Additional base shapes can be added in edit mode using the deformers -g flag.

HistoryLocation = Enum( EnumValue('HistoryLocation', 0, 'frontOfChain'), EnumValue('HistoryLocation', 1, 'normal'), EnumValue('HistoryLocation', 2, 'post'), EnumValue('HistoryLocation', 3, 'other'))
Origin = Enum( EnumValue('Origin', 0, 'localOrigin'), EnumValue('Origin', 1, 'worldOrigin'))
TargetType = Enum( EnumValue('TargetType', 0, 'object'), EnumValue('TargetType', 1, 'tangent'))
addBaseObject(object)

Adds a new base object to the deformer. This object will be deformed as targets are added for it and the deformation parameters change.

Parameters:
object : PyNode

new base object

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.addBaseObject

Undo is not currently supported for this method

addTarget(baseObject, weightIndex, newTarget, fullWeight, targetType='object')

Adds a new target object for the given base object. The weight index says which of the deformer’s weight values will control this target’s affects on the base object. The full weight argument determines at what weight the target is in full effect. If a base object has no other targets and the weight is set to the ‘full weight’, then the base object will look just like the target object.

Parameters:
baseObject : PyNode

base object for the target

weightIndex : int

weight index to use for target’s effect

newTarget : PyNode

new target object for the given base

fullWeight : float

weight value at which the target is in full effect

targetType : BlendShape.TargetType

target type for the target

values: ‘object’, ‘tangent’

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.addTarget

Undo is not currently supported for this method

after(val=True, **kwargs)

If the default behavior for insertion/appending into/onto the existing chain is not the desired behavior then this flag can be used to force the command to place the deformer node after the selected node in the chain even if a new geometry shape has to be created in order to do so. Works in create mode (and edit mode if the deformer has no geometry added yet).

Derived from mel command maya.cmds.blendShape

afterReference(val=True, **kwargs)

The -afterReference flag is used to specify deformer ordering in a hybrid way that choses between -before and -after automatically. If the geometry being deformed is referenced then the -after mode is used when adding the new deformer, otherwise the -before mode is used. The net effect when using -afterReference to build deformer chains is that internal shape nodes in the deformer chain will only appear at reference file boundaries, leading to lightweight deformer networks that may be more amicable to reference swapping.

Derived from mel command maya.cmds.blendShape

automatic(val=True, **kwargs)

The -automatic flag is used to specify deformer ordering in a way that choses between -frontOfChain and -before automatically. If the geometry being deformed is only affected by invertible deformers, the -frontOfChain mode is used, otherwise the -before mode is used.

Derived from mel command maya.cmds.blendShape

before(val=True, **kwargs)

If the default behavior for insertion/appending into/onto the existing chain is not the desired behavior then this flag can be used to force the command to place the deformer node before the selected node in the chain even if a new geometry shape has to be created in order to do so. Works in create mode (and edit mode if the deformer has no geometry added yet).

Derived from mel command maya.cmds.blendShape

copyDelta(val=True, **kwargs)

Set the base, source, and destination delta index values.

Derived from mel command maya.cmds.blendShape

copyInBetweenDelta(val=True, **kwargs)

Set the base, target, source, and destination delta index values.

Derived from mel command maya.cmds.blendShape

export(val=True, **kwargs)

Export the shapes to the named file path.

Derived from mel command maya.cmds.blendShape

exportTarget(val=True, **kwargs)

Specify the base and target index pairs for the export.

Derived from mel command maya.cmds.blendShape

flipTarget(val=True, **kwargs)

Flip the list of base and target pairs.

Derived from mel command maya.cmds.blendShape

frontOfChain(val=True, **kwargs)

This command is used to specify that the new deformer node should be placed ahead (upstream) of existing deformer and skin nodes in the shape’s history (but not ahead of existing tweak nodes). The input to the deformer will be the upstream shape rather than the visible downstream shape, so the behavior of this flag is the most intuitive if the downstream deformers are in their reset (hasNoEffect) position when the new deformer is added. Works in create mode (and edit mode if the deformer has no geometry added yet).

Derived from mel command maya.cmds.blendShape

getBaseObjects()

Get a list of all of the base objects for this deformer. The objects returned will be the deformed versions of the base objects.

Return type:PyNode list

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.getBaseObjects

getDeformerTools(**kwargs)

Returns the name of the deformer tool objects (if any) as string string ...

Derived from mel command maya.cmds.blendShape

getExclusive(**kwargs)

Puts the deformation set in a deform partition.

Derived from mel command maya.cmds.blendShape

getGeometry(**kwargs)

The specified object will be added to the list of objects being deformed by this deformer object, unless the -rm flag is also specified. When queried, this flag returns string string string ...

Derived from mel command maya.cmds.blendShape

getGeometryIndices(**kwargs)

Complements the -geometry flag in query mode. Returns the multi index of each geometry.

Derived from mel command maya.cmds.blendShape

getNormalizationGroups(**kwargs)

Returns a list of the used normalization group IDs.

Derived from mel command maya.cmds.blendShape

getOrigin()

Gets the origin space. It defines the point around which the differences in the geometry are calculated.

Return type:BlendShape.Origin

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.origin

getSymmetryAxis(**kwargs)

Axis for symmetry. Valid values are X, Y, and Z.

Derived from mel command maya.cmds.blendShape

getSymmetryEdge(**kwargs)

One or two symmetry edge names, separated by a .. See the blendShape node’s symmetryEdge attribute for legal values.

Derived from mel command maya.cmds.blendShape

getSymmetrySpace(**kwargs)

Space for symmetry. 0 = Topological, 1 = Object, 2 = UV

Derived from mel command maya.cmds.blendShape

getTarget(**kwargs)

Set target object as the index target shape for the base shape base object. The full influence of target shape takes effect when its shape weight is targetValue. Parameter list: string: the base objectint: indexstring: the target objectdouble: target value

Derived from mel command maya.cmds.blendShape

getTargets(baseObject, weightIndex)

Get a list of all of the target objects for the given base object that affect it based on the given weight index.

Parameters:
baseObject : PyNode

The base shape of interest.

weightIndex : int

The index of the weight attribute. Since the weight indices may be sparse, the weightIndexList method should be used to find the weight indices used by a given blendShape.

Return type:

PyNode list

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.getTargets

getTransform(**kwargs)

Set transform for target, then the deltas will become relative to a post transform. Typically the best workflow for this option is to choose a joint that is related to the fix you have introduced. This flag should be used only if the Deformation orderof blendShape node is Before.

Derived from mel command maya.cmds.blendShape

getWeight(index)

Get the weight value at the given index. To be valid, a weight value should only be requested at index values returned by MFnBlendShapeDeformer::weightIndexList .

Parameters:
index : int

index of weight value

Return type:

float

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.weight

getWeightCount(**kwargs)

Set the number of shape weight values. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.blendShape

inBetween(val=True, **kwargs)

Indicate that the specified target should serve as an inbetween. An inbetween target is one that serves as an intermediate target between the base shape and another target.

Derived from mel command maya.cmds.blendShape

inBetweenIndex(val=True, **kwargs)

Only used with the -rtd/-resetTargetDelta flag to remove delta values for points in the inbetween target geometry defined by this index.

Derived from mel command maya.cmds.blendShape

inBetweenType(val=True, **kwargs)

Specify if the in-between target to be created is relative to the hero target or if it is absolute. If it is relative to hero targets, the in-between target will get any changes made to the hero target. Valid values are relativeand absolute. This flag should always be used with the -ib/-inBetween and -t/-target flags.

Derived from mel command maya.cmds.blendShape

ip(val=True, **kwargs)

Import the shapes from the named file path.

Derived from mel command maya.cmds.blendShape

mergeSource(val=True, **kwargs)

List of source indexes for a merge.

Derived from mel command maya.cmds.blendShape

mergeTarget(val=True, **kwargs)

Target index of a merge

Derived from mel command maya.cmds.blendShape

mirrorDirection(val=True, **kwargs)

Mirror direction; 0 = negative, 1 = positive

Derived from mel command maya.cmds.blendShape

mirrorTarget(val=True, **kwargs)

Mirror the list of base and target pairs.

Derived from mel command maya.cmds.blendShape

numWeights()

Return the number of weight values that this blend shape deformer has. The number of weight values is equal to the number of targets. Targets are either shapes in the dag or baked data on the blendShape node (when a target shape is deleted).

Return type:int

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.numWeights

parallel(val=True, **kwargs)

Inserts the new deformer in a parallel chain to any existing deformers in the history of the object. A blendShape is inserted to blend the parallel results together. Works in create mode (and edit mode if the deformer has no geometry added yet).

Derived from mel command maya.cmds.blendShape

prune(val=True, **kwargs)

Removes any points not being deformed by the deformer in its current configuration from the deformer set.

Derived from mel command maya.cmds.blendShape

remove(val=True, **kwargs)

Specifies that objects listed after the -g flag should be removed from this deformer.

Derived from mel command maya.cmds.blendShape

removeTarget(baseObject, weightIndex, target, fullWeight)

Remove a target object for the given base object. The weight index specifies the index at which target is connected. The full weight argument specifies at what weight the target is in full effect.

Parameters:
baseObject : PyNode

base object for the target

weightIndex : int

weight index corresponding to the target

target : PyNode

target object for the given base to be removed

fullWeight : float

weight value at which the target is in full effect

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.removeTarget

Undo is not currently supported for this method

resetTargetDelta(val=True, **kwargs)

Remove all delta values for points in the target geometry, including all sequential targets defined by target index. Parameter list: uint: the base object indexuint: the target index

Derived from mel command maya.cmds.blendShape

setGeometry(val=True, **kwargs)

The specified object will be added to the list of objects being deformed by this deformer object, unless the -rm flag is also specified. When queried, this flag returns string string string ...

Derived from mel command maya.cmds.blendShape

setOrigin(space)

Sets the origin space. It defines the point around which the differences in the geometry are calculated.

Parameters:
space : BlendShape.Origin

origin space

values: ‘localOrigin’, ‘worldOrigin’

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.setOrigin

setSymmetryAxis(val=True, **kwargs)

Axis for symmetry. Valid values are X, Y, and Z.

Derived from mel command maya.cmds.blendShape

setSymmetryEdge(val=True, **kwargs)

One or two symmetry edge names, separated by a .. See the blendShape node’s symmetryEdge attribute for legal values.

Derived from mel command maya.cmds.blendShape

setSymmetrySpace(val=True, **kwargs)

Space for symmetry. 0 = Topological, 1 = Object, 2 = UV

Derived from mel command maya.cmds.blendShape

setTarget(val=True, **kwargs)

Set target object as the index target shape for the base shape base object. The full influence of target shape takes effect when its shape weight is targetValue. Parameter list: string: the base objectint: indexstring: the target objectdouble: target value

Derived from mel command maya.cmds.blendShape

setTransform(val=True, **kwargs)

Set transform for target, then the deltas will become relative to a post transform. Typically the best workflow for this option is to choose a joint that is related to the fix you have introduced. This flag should be used only if the Deformation orderof blendShape node is Before.

Derived from mel command maya.cmds.blendShape

setWeight(index, weight)

Set the weight value at the given index.

Parameters:
index : int

index of weight value

weight : float

new weight value

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.setWeight

setWeightCount(val=True, **kwargs)

Set the number of shape weight values. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.blendShape

tangentSpace(val=True, **kwargs)

Indicate that the delta of the specified target should be relative to the tangent space of the surface.

Derived from mel command maya.cmds.blendShape

targetItemIndexList(weightIndex, baseObject)

A base object may have more than one target using the same element of the blendShape’s ‘weights’ array. We refer to these as the base object’s “target items” for that weight index.

Parameters:
weightIndex : int

‘weights’ array index.

baseObject : PyNode

The deformed object of interest

Return type:

int list

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.targetItemIndexList

weightIndexList()

Return the array index numbers corresponding to the targets. The resulting index list will be the length of MFnBlendShape::numWeights. This method exists because the indices of the targets can be sparse. For example, if a target has been removed using Deform -> Edit BlendShape -> Remove.

Return type:int list

Derived from api method maya.OpenMayaAnim.MFnBlendShapeDeformer.weightIndexList