Python API 2.0 Reference
OpenMayaAnim.MFnSkinCluster Class Reference
+ Inheritance diagram for OpenMayaAnim.MFnSkinCluster:

Public Member Functions

def __init__ ()
 
def getBlendWeights ()
 
def getPointsAffectedByInfluence ()
 
def getWeights ()
 
def indexForInfluenceObject ()
 
def influenceObjects ()
 
def setBlendWeights ()
 
def setWeights ()
 
- Public Member Functions inherited from OpenMayaAnim.MFnGeometryFilter
def __init__ ()
 
def getComponentAtIndex ()
 
def getInputGeometry ()
 
def getOutputGeometry ()
 
def getPathAtIndex ()
 
def groupIdAtIndex ()
 
def indexForGroupId ()
 
def indexForOutputConnection ()
 
def indexForOutputShape ()
 
def inputShapeAtIndex ()
 
def numOutputConnections ()
 
def outputShapeAtIndex ()
 
- Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __init__ ()
 
def absoluteName ()
 
def addAttribute ()
 
def addExternalContentForFileAttr ()
 
def affectsAnimation ()
 
def attribute ()
 
def attributeClass ()
 
def attributeCount ()
 
def canBeWritten ()
 
def create ()
 
def dgCallbackIds ()
 
def dgCallbacks ()
 
def dgTimer ()
 
def dgTimerOff ()
 
def dgTimerOn ()
 
def dgTimerQueryState ()
 
def dgTimerReset ()
 
def findAlias ()
 
def findPlug ()
 
def getAffectedAttributes ()
 
def getAffectingAttributes ()
 
def getAliasAttr ()
 
def getAliasList ()
 
def getConnections ()
 
def getExternalContent ()
 
def hasAttribute ()
 
def hasUniqueName ()
 
def isFlagSet ()
 
def isNewAttribute ()
 
def isTrackingEdits ()
 
def name ()
 
def plugsAlias ()
 
def removeAttribute ()
 
def reorderedAttribute ()
 
def setAffectsAnimation ()
 
def setAlias ()
 
def setDoNotWrite ()
 
def setExternalContent ()
 
def setExternalContentForFileAttr ()
 
def setFlag ()
 
def setName ()
 
def setUuid ()
 
def uniqueName ()
 
def userNode ()
 
def uuid ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
def __init__ ()
 
def hasObj ()
 
def object ()
 
def setObject ()
 
def type ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMayaAnim.MFnGeometryFilter
def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnDependencyNode
def __new__ ()
 
def allocateFlag ()
 
def classification ()
 
def deallocateAllFlags ()
 
def deallocateFlag ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Additional Inherited Members

- Static Public Attributes inherited from OpenMaya.MFnDependencyNode
int kTimerMetrics = 9
 
int kTimerTypes = 3
 
int kExtensionAttr = 3
 
int kInvalidAttr = 4
 
int kLocalDynamicAttr = 1
 
int kNormalAttr = 2
 
int kTimerInvalidState = 3
 
int kTimerOff = 0
 
int kTimerOn = 1
 
int kTimerUninitialized = 2
 
int kTimerMetric_callback = 0
 
int kTimerMetric_callbackNotViaAPI = 6
 
int kTimerMetric_callbackViaAPI = 5
 
int kTimerMetric_compute = 1
 
int kTimerMetric_computeDuringCallback = 7
 
int kTimerMetric_computeNotDuringCallback = 8
 
int kTimerMetric_dirty = 2
 
int kTimerMetric_draw = 3
 
int kTimerMetric_fetch = 4
 
int kTimerType_count = 2
 
int kTimerType_inclusive = 1
 
int kTimerType_self = 0
 
- Properties inherited from OpenMayaAnim.MFnGeometryFilter
 deformerSet = property(...)
 
 envelope = property(...)
 
- Properties inherited from OpenMaya.MFnDependencyNode
 isDefaultNode = property(...)
 
 isFromReferencedFile = property(...)
 
 isLocked = property(...)
 
 isShared = property(...)
 
 namespace = property(...)
 
 pluginName = property(...)
 
 typeId = property(...)
 
 typeName = property(...)
 

Detailed Description

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

Constructor & Destructor Documentation

def OpenMayaAnim.MFnSkinCluster.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaAnim.MFnSkinCluster.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaAnim.MFnSkinCluster.getBlendWeights ( )
getBlendWeights(shape, components) -> MDoubleArray

Returns blend weights for the specified components of the deformed
shape. Blend weights are used to determine the blending between
classical linear skinning and dual quaternion bases skinning on a
per vertex basis. The returned array contains one weight per component
in the order given by 'components'.

* shape     (MDagPath) - the object being deformed by the skinCluster
* components (MObject) - components for which weights should be returned
def OpenMayaAnim.MFnSkinCluster.getPointsAffectedByInfluence ( )
getPointsAffectedByInfluence(influence) -> (MSelectionList, MDoubleArray)

During deformation, the skinCluster algorithm is applied for a given
influence object on all points in the deformer's set whose weights
are non-zero. This returns the non-zero weights for a particular
influence object.

The return value is a tuple consisting of a selection list, which
contains the dag path and components that are affected by the
specified influence object, and the corresponding weights for the
components. If no components are weighted for a specified influence
the selection list will be empty.

* influence (MDagPath) - the influence object of interest
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.indexForInfluenceObject ( )
indexForInfluenceObject(influenceObj) -> long

Returns the logical index of the matrix array attribute where the
specified influence object is attached.

* influenceObj (MObject) - influence object for which the index is requested.
def OpenMayaAnim.MFnSkinCluster.influenceObjects ( )
influenceObjects() -> MDagPathArray

Returns an array of paths to the influence objects for the skinCluster.
def OpenMayaAnim.MFnSkinCluster.setBlendWeights ( )
setBlendWeights(shape, components, weights) -> self

Sets blend weights for the specified components of the shape being
deformed by the skinCluster. Blend weights are used to determine the
blending between classical linear skinning and dual quaternion bases
skinning on a per vertex basis.

* shape       (MDagPath) - object being deformed by the skinCluster
* components   (MObject) - components of 'shape' to set blend weights for
* weights (MDoubleArray) - weights to set, one per component. If the
               length of this array does match the number
               of components provided then the lesser of
               the two will be used.
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