PoseBase¶
vtool.maya_lib.corrective.PoseBase ([description]) |
Base class for poses that sculpt meshes. |
-
class
PoseBase
(description=’pose’)¶ Base class for poses that sculpt meshes.
-
set_pose
(pose_name)¶ Set the pose that the instance should work on.
Parameters: pose_name (str) – The name of a pose.
-
rename
(description)¶ Rename the pose and the target on the blendshape.
Parameters: description (str) – The new name for the pose. Returns: The new name. Return type: str
-
delete
()¶ Delete the pose and pose related nodes.
-
has_a_mesh
()¶ Check if the pose has a mesh.
Returns: Wether the pose has a mesh or not. Return type: bool
-
add_mesh
(mesh, toggle_vis=True)¶ Add a mesh to the pose.
Parameters: - mesh (str) – The name of a mesh.
- toggle_vis (bool) – Wether to toggle the meshes visibility.
Returns: Returns: the name of the created pose mesh for sculpting. Return False if failed.
Return type: str
-
remove_mesh
(mesh)¶ Remove a mesh from the pose.
Parameters: mesh (str) – The name of a mesh affected by the pose.
-
get_mesh
(index)¶ Get the sculpt mesh at the index. Sculpt mesh is the mesh used to generate the delta.
Parameters: index (int) – The index of a sculpt mesh. Returns: The name of the sculpt mesh at the index. Return type: str
-
get_mesh_count
()¶ Get the number of meshes the pose affects.
Returns: int
-
get_target_meshes
()¶ Get the meshes affected by the pose.
Returns: A list of the names of meshes. Return type: list
-
get_target_mesh
(mesh)¶ Get the mesh that the sculpt mesh affects.
Parameters: mesh (str) – The name of a mesh affected by the pose. Returns: The name of a mesh. Return type: str
-
get_target_mesh_index
(target_mesh)¶ Get the index of a target mesh. Target meshes are the meshes that have the delta applied to them.
Parameters: target_mesh (str) – The name of a target mesh. Returns: The index of the mesh. Return type: int
-
get_mesh_index
(mesh)¶ Get the index of a sculpt mesh.
Parameters: mesh (str) – The name of a sculpt mesh.
-
reset_target_meshes
(*args, **kwargs)¶ Reset target meshes on a pose, so that they have no corrective delta.
-
update_target_meshes
(only_not_in_sculpt=False)¶
-
revert_selected_verts
()¶
-
is_mesh_in_sculpt
(index)¶
-
visibility_off
(mesh, view_only=False)¶ Turn the sculpt mesh visibility off.
Parameters: - mesh (str) – The name of the mesh afftected by the pose. Its corresponding sculpt mesh will have its visibility turned off.
- vew_only (bool) – Wether to just change the view, or recalculate the delta.
-
visibility_on
(mesh)¶ Turn sculpt visibility on.
Parameters: mesh (str) – The name of a mesh affected by the pose. Its corresponding sculpt mesh will have its visibility turned on.
-
toggle_vis
(mesh_index, view_only=False)¶ Toggle the visibility of a sculpt mesh.
Parameters: - mesh_index (int) – The index of a sculpt mesh.
- view_only (bool) – Wether to just change visibility, or refresh the delta when visibility is turned off.
-
create_all_blends
()¶ Create all the blends in a pose. This refreshes the deltas.
-
create_blend
(mesh_index, goto_pose=True, sub_poses=True)¶ Create the blend. This will refresh the delta.
Parameters: - mesh_index (int) – Work with the mesh at the index. Pose needs to be affecting at least one mesh.
- goto_pose (bool) – Wether to go to the pose.
- sub_poses (bool) – Wether to create blend for sub poses as well.
-
detach_sub_poses
()¶ Detach the sub poses. Attaching and detaching help with export/import.
-
attach_sub_poses
(outputs)¶ Attach the sub poses. Attaching and detaching help with export/import.
-
connect_blend
(mesh_index=None)¶ Connect pose to the blendshape.
Parameters: mesh_index (int) – Work with the mesh at the index.
-
disconnect_blend
(mesh_index=None)¶ Disconnect pose to the blendshape.
Parameters: mesh_index (int) – Work with the mesh at the index.
-
delete_blend_input
()¶ Delete the connections going into the blendshape.
-
get_blendshape
(mesh_index=None)¶ Get the blendshape.
Parameters: mesh_index (int) – Work with the mesh at the index.
-
disconnect_weight_outputs
()¶ Disconnect outputs from the pose.weight attribute.
-
reconnect_weight_outputs
(outputs)¶ Connect outputs from pose.weight attr.
-
attach
(outputs=None)¶ Attach the pose. Attaching and detaching help with export/import.
Parameters: outputs (list) –
-
create
()¶ Create the pose.
Returns: The new name. Return type: str
-
create_sub_poses
(mesh=None)¶ Create the blends and refresh deltas for the sub poses in a pose.
Parameters: mesh (int) – Work with the mesh at the index. Pose needs to be affecting at least one mesh.
-
detach
()¶ Detach the pose. Attaching and detaching help with export/import.
-
get_type
()¶
-
goto_pose
()¶ Goto the pose. This is important so the character can back into the same pose it was sculpted at.
-
is_a_pose
(node)¶ Check if the named node is a pose.
Parameters: node (str) – The name of a node.
-
mirror
()¶ Mirror the pose.
-
select
()¶ Select the pose.
-
set_pose_group
(pose_group_name)¶ Set the pose group to work with. The pose group is pose_gr by default and is setu automatically.
Parameters: pose_group_name (str) – The name of a pose group.
-