trigger.actions.kinematics

Builds the kinematics starting from the given root and for all descendants

Attributes

ACTION_DATA

db

log

Classes

Kinematics

Module Contents

class Kinematics(root_joints=None, progress_bar=None, create_switchers=True, rig_name=None, vcs=None)

Bases: trigger.core.action.ActionCore

action()

Mandatory Method - Execute Action

collect_guides_info(root_node)

Collects all the joints under the rootNode hierarchy Args:

root_node: (string) All the hiearchy under this will be collected

Returns: None

create_limbs(limb_creation_list=None, add_limb=False, root_plug=None, parent_socket=None, master_cont=None, selection_mode=False)

Creates limb with the order defined in the limbCreationList (which created with getLimbProperties) Args:

limb_creation_list: (List) The list of initial limb roots for creation add_limb: (Boolean) If True, it adds the first node in the selection list to the rig. Default False.

The selection order must be with this order: initial Limb root => parent joint of the existing rig => master controller of the existing rig (for the extra attributes and global scaling)

root_plug: (String) The root node of the limb to be added. Must be a valid root node. parent_socket: (String) The parent socket of the limb to be added. Must be a valid socket. master_cont: (String) The master controller of the rig to be added. Must be a valid master controller. selection_mode: (Boolean) If True, it uses the selection order to add the limb. Default False.

Returns: None

feed(action_data)

Mandatory Function for builder- feeds with the Action Data from builder

get_limb_hierarchy(node, is_root=True, parent_index=None, r_list=None)

Checks the given nodes entire hieararchy for roots, and catalogues the root nodes into dictionaries.

Args:

node (string): starts checking from this node is_root(bool): if True, the given joint is considered as true. Default is True. For recursion. parent_index(string): indicates the parent of the current node. Default is none. For recursion. r_list(list): If a list is provided, it appends the results into this one. For recursion

Returns (list): list of root guide nodes in the hierarchy

static get_nearest_socket(init_joint, limb_sockets, excluding=None)

searches through limbSockets list and gets the nearest socket to the initJoint. Args:

init_joint: (pymel object) initial joint to test the distance limb_sockets: (list) limbSockets list excluding: (list) list of sockets to exclude from the search

Returns:

get_whole_limb(node)
save_action(*args, **kwargs)

Mandatory Method

static ui(ctrl, layout, handler, *args, **kwargs)

Mandatory Method

action_data
ACTION_DATA
db
log