maya.types.blendshape¶
Blendshape type for Maya integration.
Classes¶
Blendshape node type for Maya. |
Module Contents¶
- class BlendShape(long_name, **kwargs)¶
Bases:
maya.core.node.NodeBlendshape node type for Maya.
- add_inbetween(target, target_geometry, weight=0.5, **kwargs)¶
Add an in-between target shape to an existing target.
- Args:
target: The index or name of the target to add the in-between to. target_geometry: The geometry to add as the in-between target. weight: The weight value at which the in-between is active.
- add_target(target_geometry, name=None, weight=1.0, **kwargs)¶
Add a new target shape to the blendshape.
- Args:
geometry: The geometry to add as a target. name: Optional name for the target. weight: Initial weight value for the target.
- Returns:
int: The index of the newly added target.
- classmethod create(**kwargs)¶
Create Blendshape node type for Maya.
- get_target_weights(target, geometry=None)¶
Get weights for a specific target shape (e.g. ‘pCube2’). Args:
target: The index or name of the target.
- get_weights(geometry=None)¶
Get the global deformer weights. (This corresponds to the BlendShape node entry in the Paint Weights tool).
- index_by_name(target_name)¶
Get the index of a target by its name.
- load_weights(file_path, method='index', **kwargs)¶
Import blendshape weights from a file.
- Args:
file_path (str or Path Object): The file path to import weights from. method (str): The method to use for importing weights.
Valid values are: “index”, “nearest”, “barycentric”, “bilinear” and “over”
- name_by_index(target_index)¶
Get the name of a target by its index.
- save_weights(file_path, **kwargs)¶
Export blendshape weights to a file.
- Args:
file_path (str or Path Object): The file path to export weights to.
- set_target_weights(target, weights, geometry=None)¶
Set weights for a specific target shape. Args:
target: The index or name of the target.
- set_weights(weights, geometry=None)¶
Set the global deformer weights.
- property base_shapes¶
Return the list of base shapes as list of objects.
- property influences¶
Return the list of blendshape influences.
- property next_target: int¶
Returns the next free index from a multi index attribute
- property weight_count¶
Return the number of weight targets.