SkinCluster¶
-
class
cgp_maya_utils.scene.SkinCluster(name)¶ Bases:
cgp_maya_utils.scene.GeometryFilternode object that manipulates a
skinClusternode-
addInfluence(influence)¶ add influence to the skinCluster
Parameters: influence (str) – influence to add to the skinCluster
-
bindPreMatrixes()¶ get the bindPreMatrixes of the skinCluster
Returns: bindPreMatrixes dictionary - {influence1: matrixAttribute1, influence2: matrixAttribute2 ...}Return type: dict[str: str]
-
connectBindPreMatrixes(bindPreMatrixes=None)¶ connect the bindPreMatrixes of the skinCluster
Parameters: bindPreMatrixes (dict) – bindPreMatrixes of the skinCluster - {influence1: matrixAttribute1, influence2: matrixAttribute2 ...}
-
copy(shape, byProximity=True)¶ copy the skinCluster to the shape
Parameters: - shape (str or
cgp_maya_utils.scene.Shape) – shape on which to copy the skinCluster - byProximity (bool) –
True: weights are copied by proximity -False: weights are injected on points
Returns: the created copied SkinCluster
Return type: - shape (str or
-
classmethod
create(shapes, influences, weights=None, bindPreMatrixes=None, attributeValues=None, name=None, **__)¶ create a skinCluster
Parameters: - shapes (list[str] or list[
cgp_maya_utils.scene.Shape]) – shapes that will be deformed by the skinCluster - influences (list[str] or list[
cgp_maya_utils.scene.Joint,cgp_maya_utils.scene.Shape]) – influences that will drive the skinCluster - weights (dict[str: list[int, float]]) – weights of the skin cluster -
{influence1: [], influence2: [] ...} - bindPreMatrixes (dict) – bindPreMatrixes of the skinCluster -
{influence1: matrixAttribute1, influence2: matrixAttribute2 ...} - attributeValues (dict) – attribute values to set on the skinCluster node
- name (str) – name of the skinCluster node
Returns: the created skinCluster
Return type: - shapes (list[str] or list[
-
data()¶ data necessary to store the skinCluster node on disk and/or recreate it from scratch
Returns: the data of the skinCluster node Return type: dict
-
influences()¶ the influences of the skinCluster
Returns: the influences of the skinCluster Return type: list[ cgp_maya_utils.scene.Joint,cgp_maya_utils.scene.Shape]
-
recacheBindMatrices()¶ recache the bind matrixes of the skinCluster
-
removeInfluence(influence)¶ remove an influence from the skinCluster
Parameters: influence (str or cgp_maya_utils.scene.Jointorcgp_maya_utils.scene.Shape) – the influence to remove from the skinCluster
-
reset()¶ reset the skinCluster
-
setWeights(weights)¶ set the weights of the skinCluster
Parameters: weights (dict) – weights to set on the skinCluster - {influence1: [], influence2: [] ...}
-
swapInfluences(oldFlag, newFlag, reset=True)¶ swap current influences by new influences using the flags
Parameters:
-
unusedInfluences()¶ the unused influences of the skinCluster
Returns: the unused influences Return type: list[ cgp_maya_utils.scene.Joint, Shape]
-