PoseCone¶
vtool.maya_lib.corrective.PoseCone ([…]) |
This type of pose reads from a joint or transform, for the defined angle of influence. |
-
class
PoseCone
(transform=None, description=’pose’)¶ This type of pose reads from a joint or transform, for the defined angle of influence.
-
set_axis
(axis_name)¶ Set the axis the cone reads from. ‘X’,’Y’,’Z’.
-
get_transform
()¶ Get the connected/stored transform on a cone.
Returns: The name of the transform. Return type: str
-
set_transform
(transform, set_string_only=False)¶ Cone poses need a transform. This helps them to know when to turn on.
Parameters: - transform (str) – The name of a transform to move the cone.
- set_string_only (bool) – Wether to connect the transform into the pose or just set its attribute on the cone.
-
get_parent
()¶ Get the connected/stored parent on a cone.
Returns: The name of the parent. Return type: str
-
set_parent
(parent, set_string_only=False)¶ Cone poses need a parent. This helps them to turn on only when their transform moves.
Parameters: - parent (str) – The name of a transform above the cone.
- set_string_only (bool) – Wether to connect the parent into the pose or just set its attribute on the cone.
-
rematch_cone_to_joint
()¶
-
detach
()¶
-
attach
(outputs=None)¶
-
create
()¶
-
goto_pose
()¶
-
mirror
()¶ Mirror a pose to a corresponding R side pose.
- For example
- If self.pose_control = pose_arm_L, there must be a corresponding pose_arm_R. The pose at pose_arm_R must be a mirrored pose of pose_arm_L.
-
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
-
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.
-
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.
-
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.
-
delete
()¶ Delete the pose and pose related nodes.
-
delete_blend_input
()¶ Delete the connections going into the blendshape.
-
detach_sub_poses
()¶ Detach the sub poses. Attaching and detaching help with export/import.
-
disconnect_blend
(mesh_index=None)¶ Disconnect pose to the blendshape.
Parameters: mesh_index (int) – Work with the mesh at the index.
-
disconnect_weight_outputs
()¶ Disconnect outputs from the pose.weight attribute.
-
get_blendshape
(mesh_index=None)¶ Get the blendshape.
Parameters: mesh_index (int) – Work with the mesh at the index.
-
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_mesh_index
(mesh)¶ Get the index of a sculpt mesh.
Parameters: mesh (str) – The name of a sculpt mesh.
-
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_target_meshes
()¶ Get the meshes affected by the pose.
Returns: A list of the names of meshes. Return type: list
-
get_type
()¶
-
has_a_mesh
()¶ Check if the pose has a mesh.
Returns: Wether the pose has a mesh or not. Return type: bool
-
is_a_pose
(node)¶ Check if the named node is a pose.
Parameters: node (str) – The name of a node.
-
is_mesh_in_sculpt
(index)¶
-
reconnect_weight_outputs
(outputs)¶ Connect outputs from pose.weight attr.
-
remove_mesh
(mesh)¶ Remove a mesh from the pose.
Parameters: mesh (str) – The name of a mesh affected by the 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
-
reset_target_meshes
(*args, **kwargs)¶ Reset target meshes on a pose, so that they have no corrective delta.
-
revert_selected_verts
()¶
-
select
()¶ Select the pose.
-
set_pose
(pose_name)¶ Set the pose that the instance should work on.
Parameters: pose_name (str) – The name of a 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.
-
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.
-
update_target_meshes
(only_not_in_sculpt=False)¶
-
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.
-