Function set for operating on skinCluster nodes.
SkinCluster nodes are created during a smooth bindSkin. They
store a weight per influence object for each component of the
geometry that is deformed. Influence objects can be joints or
any transform.
Unlike most deformers, a skinCluster node can deform only a
single geometry. Therefore, if additional geometries are added
to the skinCluster set, they will be ignored.
__init__()
Initializes a new, empty MFnSkinCluster functionset.
__init__(MObject)
Initializes a new MFnSkinCluster functionset and attaches it to
a skinCluster node.
Method resolution order:
- MFnSkinCluster
- MFnGeometryFilter
- OpenMaya.MFnDependencyNode
- OpenMaya.MFnBase
- builtins.object
def OpenMayaAnim.MFnSkinCluster.getWeights |
( |
| ) |
|
getWeights(shape, components) -> (MDoubleArray, int)
getWeights(shape, components, influence) -> MDoubleArray
getWeights(shape, components, influences) -> MDoubleArray
Returns the skinCluster weights of the given influence objects on
the specified components of the deformed shape.
If no influence index is provided then a tuple containing the weights
and the number of influence objects will be returned.
If a single influence index is provided the an array of weights will
be returned, one per component in the same order as in 'components'.
If an array of influence indices is provided an array of weights will
be returned containing as many weights for each component as there
are influences in the 'influenceIndices' array. The weights will be
in component order: i.e. all of the weight values for the first
component, followed by all the weight values for the second component,
and so on.
* shape (MDagPath) - the object being deformed by the skinCluster
* components (MObject) - components to return weights for
* influence (int) - index of the single influence to return weights for
* influences (MIntArray) - indices of multiple influences to return weights for
def OpenMayaAnim.MFnSkinCluster.setWeights |
( |
| ) |
|
setWeights(shape, components, influence, weight, normalize=True, returnOldWeights=False) -> None or MDoubleArray
setWeights(shape, components, influences, weights, normalize=True, returnOldWeights=False) -> None or MDoubleArray
Sets the skinCluster weights for one or more influence objects on
the specified components of the given shape. If 'returnOldWeights'
is True then the old weights will be returned, otherwise None will
be returned
If only a single influence index and weight are specified then that
weight is applied to all of the specified components. The returned
array of old weights, if requested, will contain weights for ALL of
the skinCluster's influence objects, not just the one specified by
the 'influence' parameter.
If arrays of influence indices and weights are provided then the
behaviour depends upon the number of elements in the 'weights' array.
If it's equal to the number of influences specified then each weight
will be used for all of components for the corresponding influence
object. If it's equal to the number of influences times the number of
components provided, then a separate weight will be used for each
component, with all of the weights for the first component coming
first in the 'weights' array, followed by all of the weights for the
second component, and so on. Within each component the weights will
will correspond with the ordering of influence indices in the
'influences' array. The returned old weights, if requested, will
consist of a separate weight for
The returned old weights will be ordered by influence within
component, i.e. all of the influence weights for the first component
will come first in the array, followed by all the weights for the
second component, and so on.
* shape (MDagPath) - object being deformed by the skinCluster
* components (MObject) - the components to set weights on
* influence (int) - physical index of a single influence object
* weight (float) - single weight to be applied to all components.
* influences (MIntArray) - physical indices of several influence objects.
* weights (MDoubleArray) - weights to be used with several influence objects.
* normalize (bool) - if True, normalize weights on other influence objects
* returnOldWeights(bool) - if True, return the old weights, otherwise return None