RigSwitch

vtool.maya_lib.rigs_util.RigSwitch(switch_joint) Create a switch between different rigs on a buffer joint.
class RigSwitch(switch_joint)

Create a switch between different rigs on a buffer joint.

Parameters:switch_joint (str) – The name of a buffer joint with switch attribute.
get_weight_count()
add_groups_to_index(index, groups)

A switch joint is meant to switch visibility between rigs. By adding groups you define what their visibility is when the switch attribute changes. An index of 0 means the groups will be visibile when the switch is at 0, but invisible when the switch is at 1.

Parameters:
  • index (int) – The index on the switch. Needs to be an integer value even though switch is a float.
  • groups (list) – The list of groups that should be have visibility attached to the index.
set_attribute_control(transform)

Set where the switch attribute should live.

Parameters:transform (str) – The name of a transform
set_attribute_name(attribute_name)

Set the name of the switch attribute on the attribute_control.

Parameters:attribute_name (str) – The name for the attribute.
create()