PoseCombo

vtool.maya_lib.corrective.PoseCombo([…])
class PoseCombo(description=’pose’)
set_input(attribute)

Set the input into the weightInput of the no reader. No readers need to have a connection specified that tells the pose when to turn on.

Parameters:attribute (str) – The node.attribute name of a connection to feed into the no reader.
add_pose(pose_name)
get_pose_index(pose)
remove_pose(pose_name)
get_pose(index)
get_poses()
refresh_multiply_connections()
attach(outputs=None)
detach()
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()

Create the pose.

Returns:The new name.
Return type:str
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_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_input()

Get the connection into the weightInput attribute of a no reader. No readers need to have a connection specified that tells the pose when to turn on.

Returns:node.attribute name
Return type:str
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()
goto_pose()

Goto the pose. This is important so the character can back into the same pose it was sculpted at.

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)
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.
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.
set_weight(value)

Set the weight attribute of the no reader. No readers have connections specified. If no connection is specified and connected, this can set the weight.

Parameters:value (float) – The value to set the weight to.
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.