vtool.maya_lib.corrective¶
Class Summary
Convenience for working with poses. |
|
|
This pose is a group to parent poses under. |
|
Base class for poses that sculpt meshes. |
|
This type of pose does not read anything in a rig unless an input is specified. |
|
|
|
This type of pose reads from a joint or transform, for the defined angle of influence. |
|
This type of pose reads a time on the timeline. |
Function Summary
|
Get a pose instance from the pose name. |
- get_pose_instance(pose_name, pose_group='pose_gr')¶
Get a pose instance from the pose name.
- Parameters
pose_name (str) – The name of a pose.
- Returns
The instance of the pose at the pose type.
- Return type
object
- class PoseManager¶
Convenience for working with poses.
- is_pose(name)¶
Check if name matches the name of a pose.
- Parameters
name (str) – Check if the node at name is a pose.
- Returns
bool
- is_pose_mesh_in_sculpt(index, pose_name)¶
- get_pose_instance(pose_name)¶
Get the instance of a pose.
- Parameters
pose_name (str) – The name of a pose.
- Returns
The instance of the pose at the pose type.
- Return type
object
- get_poses(all_descendents=False)¶
Get the poses under the pose_gr
- Returns
The names of poses.
- Return type
list
- get_pose_control(name)¶
Get the control of a pose.
- Parameters
name (str) – The name of a pose.
- Returns
The name of the pose.
- Return type
str
- get_pose_type(name)¶
- set_namespace(namespace)¶
- set_pose_group(pose_gr_name)¶
Set the pose group to work with.
- Parameters
pose_gr_name (str) – The name of a pose group.
- set_weights_to_zero()¶
Set all poses in the pose_gr to zero.
- set_default_pose()¶
Set the default control pose. This is the control pose the rig should revert to by default.
- set_pose_to_default()¶
Set the control pose to the default pose. This is handy for resetting control positions after going to a pose.
- set_pose(pose)¶
Set the control pose to the current pose. This is handy for returning a character to the pose it was sculpted in.
- Parameters
pose (str) – The name of a pose.
- set_pose_data(pose)¶
Set the pose data from the control values. This is handy for making sure a character can get back into pose before sculpting it.
- Parameters
pose (str) – The name of a pose.
- set_poses(pose_list)¶
Not in use. This was the beginning of a combo system. It proved difficult to extrapulate a combo pose from multiple poses.
- Parameters
pose_list (list) – A list of pose names.
- create_pose(pose_type, name=None)¶
Create a pose.
- Parameters
pose_type (str) – The name of a pose type.
name (str) – The name for the pose.
- Returns
The name of the new pose.
- Return type
str
- create_cone_pose(name=None)¶
Create a cone pose.
- Parameters
name (str) – The name for the pose.
- Returns
The name of the pose.
- Return type
str
- create_no_reader_pose(name=None)¶
Create a no reader pose.
- Parameters
name (str) – The name for the pose.
- Returns
The name of the pose.
- Return type
str
- create_combo_pose(name=None)¶
Create a combo pose.
- Parameters
name (str) – The name for the pose.
- Returns
The name of the pose.
- Return type
str
- create_timeline_pose(name=None)¶
Create a no timeline pose.
- Parameters
name (str) – The name for the pose.
- Returns
The name of the pose.
- Return type
str
- create_group_pose(name=None)¶
Create a group pose.
- Parameters
name (str) – The name for the pose.
- Returns
The name of the pose.
- Return type
str
- reset_pose(pose_name)¶
- update_pose_meshes(pose_name, only_not_in_sculpt=False)¶
- update_pose(pose_name)¶
- revert_pose_vertex(pose_name)¶
- rename_pose(pose_name, new_name)¶
- add_mesh_to_pose(pose_name, meshes=None)¶
- visibility_off(pose_name)¶
Change the visibility of the pose meshes.
- Parameters
pose_name (str) – The name of a pose.
- toggle_visibility(target_mesh, pose_name, view_only=False)¶
Toggle the visibility of the sculpt mesh.
- Parameters
target_mesh (str) – The name of a mesh affected by the pose.
pose_name (str) – The name of a pose.
view_only (bool) – Wether to calculate its delta when turning visibility off, or just turn visibility off.
- delete_pose(name)¶
Delete a pose by name.
- Parameters
name (str) – The name of a pose.
- detach_poses()¶
Detach poses from the pose_gr and the rig.
- attach_poses(poses=None, namespace=None)¶
Attach poses to the pose_gr and the rig.
- create_pose_blends(poses=None)¶
Refresh the deltas on poses. By default do it to all poses under the pose_gr.
- Parameters
poses (args) – The names of poses.
- mirror_pose(name)¶
Mirror a pose to a corresponding R side pose.
- For example
If pose name = 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.
- Parameters
name (str) – The name of a left side pose.
- mirror_all()¶
- reconnect_all()¶
- zero_out_blendshape_target_weights(pose=None)¶
Turn off non-connected blendshape targets.
- class PoseGroup(description='pose')¶
This pose is a group to parent poses under.
- is_a_pose(node)¶
Check if the named node is a pose.
- Parameters
node (str) – The name of a node.
- has_a_mesh()¶
- get_type()¶
- 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_pose(pose_name)¶
Set the pose that the instance should work on.
- Parameters
pose_name (str) – The name of a pose.
- goto_pose()¶
Goto the pose. This is important so the character can back into the same pose it was sculpted at.
- rename(description)¶
Rename the pose.
- Parameters
description (str) – The new name for the pose.
- Returns
The new name.
- Return type
str
- 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=None, 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.
- select()¶
Select the pose.
- attach(outputs=None)¶
Attach the pose. Attaching and detaching help with export/import.
- Parameters
outputs (list) –
- detach()¶
Detach the pose. Attaching and detaching help with export/import.
- 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.
- mirror()¶
Mirror the pose.
- 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_sculpt_mesh(target_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_mesh_index(mesh)¶
Get the index of a sculpt mesh.
- Parameters
mesh (str) – The name of a sculpt mesh.
- reset_target_meshes()¶
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.
- reconnect_blends()¶
- 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.
- set_enable(value)¶
- 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.
- class PoseNoReader(description='pose')¶
This type of pose does not read anything in a rig unless an input is specified.
- 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.
- 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.
- 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
- attach(outputs=None)¶
Attach the pose. Attaching and detaching help with export/import.
- Parameters
outputs (list) –
- detach()¶
Detach the pose. Attaching and detaching help with export/import.
- 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.
- 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.
- 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_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_sculpt_mesh(target_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)¶
- reconnect_blends()¶
- 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()¶
Reset target meshes on a pose, so that they have no corrective delta.
- revert_selected_verts()¶
- select()¶
Select the pose.
- set_enable(value)¶
- 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.
- 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)¶
Attach the pose. Attaching and detaching help with export/import.
- Parameters
outputs (list) –
- detach()¶
Detach the pose. Attaching and detaching help with export/import.
- set_weight(value)¶
Set the weight for no readers in the combo. 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.
- 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 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_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_sculpt_mesh(target_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_blends()¶
- 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()¶
Reset target meshes on a pose, so that they have no corrective delta.
- revert_selected_verts()¶
- select()¶
Select the pose.
- set_enable(value)¶
- 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.
- 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()¶
Detach the pose. Attaching and detaching help with export/import.
- 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
- goto_pose()¶
Goto the pose. This is important so the character can back into the same pose it was sculpted at.
- 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_sculpt_mesh(target_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_blends()¶
- 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()¶
Reset target meshes on a pose, so that they have no corrective delta.
- revert_selected_verts()¶
- select()¶
Select the pose.
- set_enable(value)¶
- 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.
- class PoseTimeline(description='pose')¶
This type of pose reads a time on the timeline.
- goto_pose()¶
Go to the time on the timeline where the pose was created.
- shift_time(value)¶
- create()¶
Create the pose.
- Returns
The new name.
- Return type
str
- 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(outputs=None)¶
Attach the pose. Attaching and detaching help with export/import.
- Parameters
outputs (list) –
- 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()¶
Detach the pose. Attaching and detaching help with export/import.
- 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_sculpt_mesh(target_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)¶
- 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_blends()¶
- 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()¶
Reset target meshes on a pose, so that they have no corrective delta.
- revert_selected_verts()¶
- select()¶
Select the pose.
- set_enable(value)¶
- 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.
- 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.