trigger.actions.kinematics ========================== .. py:module:: trigger.actions.kinematics .. autoapi-nested-parse:: Builds the kinematics starting from the given root and for all descendants Attributes ---------- .. autoapisummary:: trigger.actions.kinematics.ACTION_DATA trigger.actions.kinematics.db trigger.actions.kinematics.log Classes ------- .. autoapisummary:: trigger.actions.kinematics.Kinematics Module Contents --------------- .. py:class:: Kinematics(root_joints=None, progress_bar=None, create_switchers=True, rig_name=None, vcs=None) Bases: :py:obj:`trigger.core.action.ActionCore` .. py:method:: action() Mandatory Method - Execute Action .. py:method:: 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 .. py:method:: 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 .. py:method:: feed(action_data) Mandatory Function for builder- feeds with the Action Data from builder .. py:method:: 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 .. py:method:: get_nearest_socket(init_joint, limb_sockets, excluding=None) :staticmethod: 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: .. py:method:: get_whole_limb(node) .. py:method:: save_action(*args, **kwargs) Mandatory Method .. py:method:: ui(ctrl, layout, handler, *args, **kwargs) :staticmethod: Mandatory Method .. py:attribute:: action_data .. py:data:: ACTION_DATA .. py:data:: db .. py:data:: log