Starting from version 1.02.00, Arise introduces a new API (alpha) for enhanced functionality.


Additional commands will be added over time. If you require a specific command to interact with Arise, please submit a ticket to request it.


To interact with Arise, you need to have the UI open. If you used the Arise shelf button to open the UI, the Arise UI class will be assigned to the variable 'Arise'.


To access the API, simply use the 'Arise.API.<command()' structure. For example, 'Arise.API.get_all_nodes()'.



API commands:


list_commands(doc=True, name_filter=None)

    List all the commands available to the API.


    Keyword Arguments:

  • doc (bool): True to also return the docstring of each command. False to return the command name only.
  • name_filter (str or None): filter the commands by a string. Defaults to None.



get_all_nodes()

    Return a list of all the Arise nodes' names.



select_nodes(nodes_names, add=False)

    Select nodes in the scene.


    Arguments:

  • nodes_names (list): list of nodes names to select.
  • add (bool): True to add to current selection, False to replace current selection (defaults to False).



get_attachments(node_name, long_names=False)

    Return a list of all the attachments on specified node.


    Arguments:

  • node_name (str):  name of the node to retrieve the attachments from
  • long_names (bool, optional): True to return long names. Defaults to False


    Returns:

        list: list of short or long names of attachments on the given node



load_io_file(path)

    Load an Arise file (.ions) from provided path.


    Arguments:

  • path (str): full path to saved ions file



load_from_maya_scene(force=False)

    Open the Arise scene that is saved within the currently opened Maya scene.


    Arguments:

  • force (bool, optional): True to skip confirmation window. Defaults to False



save_io_file(path=None)

    Save the Arise scene to a (.ions) file.


    Arguments:

  • path (str or None): full path where to save the Arise scene file (.ions). None opens file dialog window



save_to_maya_scene()

    Save the Arise scene into the currently open Maya scene.



new_scene(cleanup=False)

    Clear the scene by removing all nodes, attachments, and groups, leaving an empty scene.


    Arguments:

  • cleanup (bool, optional): True to remove Arise Maya nodes from scene False to keep. Defaults to False



create_node(module_name, name=None, version=None, select=True)

    Create a node of a specific module.


    Arguments:

  • module_name (str): name of one of the nodes' modules (like: 'Base')


    Keyword Arguments:

  • name (str or None): how to name the node. None gives a default name. Defaults to None
  • version (int or None): version of module to create. None - latest. Defaults to None
  • select (bool): True to select the node after creation


    Returns:

        str: the new node name



create_attachment(module_name, node_name, name=None, version=None)

    Create an attachment of a specific module.


    Arguments:

  • module_name (str): name of one of the attachments' modules. (like: 'SpaceSwitch')
  • parent_name (str): specify the name of an existing node to create the attachment on


    Keyword Arguments:

  • name (str or None): how to name the attach. None gives a default name. Defaults to None
  • version (int or None): version of module to create. None - latest. Defaults to None


    Returns:

        str: attach long name (node_name:attach_name)



create_connection(source_attr, destination_attr)

    Create a connection between 2 attributes with a slot. Please exercise caution when making

    connections, as it is possible to create illegal connections in certain cases.


    Arguments:

  • source_attr (str): long name of source attribute: node_name:attach_name:attr_name
  • destination_attr (_type_): long name of source attribute: node_name:attach_name:attr_name



build_nodes(nodes_names)

    Build the nodes passed to this method.


    Arguments:

  • nodes (list): list of nodes names to Build


    Returns:

        bool: True if successfully built without error or warnings



template_nodes(nodes_names)

    Template the nodes passed to this method.


    Arguments:

  • nodes (list): list of nodes names to Template


    Returns:

        bool: True if successfully templated without errors or warnings



get_attr(attr_name)

    Get the value of an attribute on a node of attachment.

    Only supports attributes that return: bool, str, float, int, list, dict.


    Arguments:

  • attr_name (str): long name of attribute. 'node_name:attach_name:attribute'


        Returns:

            return value type depends on attribute type. bool, str, float, int, list, dict.



set_attr(attr_name, value)

    Set the value of an attribute on a node of attachment.

    Only supports attributes that take values of type: bool, str, float, int, list, dict.


    Arguments:

  • attr_name (str): long name of attribute. 'node_name:attach_name:attribute'
  • value (bool, str, float, int, list, dict): the new value for the attribute



list_attrs(name, long_names=False)

    Return a list of all the attributes on the specified node or attachment.


    Arguments:

  • name (str): node/attachment to list attributes from. Use 'node_name:attach_name' format for attachments.
  • long_names (bool, optional): True to return long names. Defaults to False


   Returns:

  • list: list of string attributes names.



type(name)

    Return the type of the specified node, attachment, or attribute.


    Arguments:

  • name (str): node/attachment/attr to get type from. Use 'node_name:attach_name:attr' format.


    Returns:

  • str: type of node, attachment, or attribute.



rename(old_name, new_name)

    Rename a node or attachment.


    Arguments:

  • old_name (str): node/attachment to be renamed. Use 'node_name:attach_name' format for attachments
  • new_name (str): the desired new name for the node/attachment


    Returns:

        str: new name of a node/attachment. Will return a different name if name is not unique.



set_disable(name, state)

    disable/enable a node or attachment.


    Arguments:

  • name (str): node/attachment to be disabled. Use 'node_name:attach_name' format for attachments
  •   state (bool): True to disable False to enable



duplicate_node(node_name)

    Duplicate specified node.


    Arguments:

  • node_name (str): name of node to duplicate


    Returns:

        str: name of new duplicate node



mirror_node(node_name)

    Mirror guides of specified node.


    Arguments:

  • node_name (str): name of node to mirror



is_mirrored(node_name)

    Return if node is mirrored.


    Arguments:

  • node_name (str): name of node


    Returns:

        bool: True if mirrored False if not



delete(name)

    Delete specified node or attachment.


    Arguments:

  • name (str): node/attachment to be delete. Use 'node_name:attach_name' format for attachments



move_node(node_name, pos_x, pos_y)

    Move node on canvas.


    Arguments:

  • node_name (str): name of node to move
  • pos_x (float): X position on canvas. Values between 0.0-11000.0
  • pos_y (float): Y position on canvas. Values between 0.0-11000.0



reset_guides(node_name, parent_guide=False)

    Reset the guides' positions to default.


    Arguments:

  • node_name (str): name of name to reset its guides
  • parent_guide (bool, optional): True to also reset the parent guide. Defaults to False.



save_guides_to_file(nodes_names, path)

    Save the nodes guides' positions to an external file.


    Arguments:

  • nodes_names (list): of names of the nodes whose guides positions you want to save
  • path (str): path where you would like to save the file



load_guides_from_file(path)

    Load nodes guides' offsets from an external file.
    Saved nodes names must match the nodes in the scene.


    Arguments:

  • path (str): path to an existing .iogos file (guides offset file)



get_node_ctrls(node_name)

    Return the names of the specified node's ctrls. The node must be in Build mode.

    

    Arguments:

  • node_name (str): name of the node to get the its ctrls


    Returns:

        list: of long names of the node's ctrls



get_node_skinning_jnts(node_name)

    Return the names of the specified node's skinning joints. The node must be in Build mode.


    Arguments:

  • node_name (str): name of the node to get the its skinning joints


    Returns:

        list: of long names of the node's skinning joints



get_all_ctrls()

    Return ALL the ctrls in the Maya scene.


    Returns:

        list: of long names of all the ctrls in the scene



get_all_skinning_joints()

    Return all skinning joints in the Maya scene.


    Returns:

        list: of long names of all the skinning joints in the scene



apply_pose(type)

    Set all ctrls in the scene to: 1=Bind Pose, 2=Bind Pose (transformations only), or 3=Zero Pose.


    Arguments:

  • type (int): what pose to set the ctrls (1-3). 1=Bind Pose, 2=Bind Pose (trans only), or 3=Zero Pose


about()

    Return a dict with information about Arise.


    Returns:

        dict: with information about Arise.



list_placeholders()

    List all the placeholders in the scene.

    Returns:

            list: of long names of all the placeholders in the scene.



transfer_weights(placeholder, joint)

    Transfer weights from placeholder to joint.


    Arguments:

  • placeholder (str): long name of placeholder joint
  • joint (str): long name of joint to transfer weights to


    Returns:

        bool: True if successful False if not



get_guides_position(node_name)

    Return a dict of the specified node guides positions.

    Used with 'set_guides_position' to set another node guides positions. Must be node of same type.


    Arguments:

  • node_name (str): name of the node to get guides positions from


    Returns:

        dict: guides positions offset dict



set_guides_position(node_name, guides_dict)

    Set the guides position of the specified node from the provided 'guides_dict'.

    First use 'get_guides_position' to get the 'guides_dict' from another node. Must be node of same type.


    Arguments:

  • node_name (str): name of the node to set guides positions to
  • guides_dict (dict): guides positions dict. Use 'get_guides_position' to get the 'guides_dict'


    Returns:

        bool: True if successful False if not



get_settings(name)

    Return a settings dict (attributes values) of specified node or attachment.

    Used with 'set_settings' to set the settings to another node or attachment.


    Arguments:

  • name (str): node/attachment name to get settings from. Use 'node_name:attach_name' format for attachments


    Returns:

        dict: settings dict



set_settings(name, settings_dict)

    Apply the settings from the 'settings_dict' to the specified node or attachment.

    First use 'get_settings' to get the 'settings_dict' from another node or attachment.

    Node copied from must be of same type.


    Arguments:

  • name (str): node/attachment to set settings to. Use 'node_name:attach_name' format for attachments
  • settings_dict (dict): settings dict. Use 'get_settings' to get the 'settings_dict'


    Returns:

        bool: True if successful False if not



store_attachment_modifications(name)

    Store modifications on specified attachment.

    Must be an attachment that have a 'save modification' such as "CtrlsShape", "Parent", "BlendshapesConn".


    Arguments:

  • name (str): name of the attachment to save its modifications



 




Examples:

### open a Maya scene that has an Arise scene stored in it, open the Arise scene, then build all the nodes.

import maya.cmds as mc

path = r"D:\my_data\tests\test_rig.ma"
mc.file(path, open=True, force=True)

Arise.API.load_from_maya_scene(force=True)
Arise.API.build_nodes(Arise.API.get_all_nodes())


### create a node of type "CA_Arm" and name it "L_Arm", duplicate it, mirror it, and rename
### the duplicate "R_Arm".
node_a = Arise.API.create_node("CA_Arm", name="L_Arm") node_b = Arise.API.duplicate_node(node_a) Arise.API.mirror_node(node_b) node_b = Arise.API.rename(node_b , "R_Arm")


### get the value of one node 'Ctrls Scale' and apply the same value to another node.

node_a = Arise.API.create_node("CA_Arm", name="L_Arm")
node_b = Arise.API.create_node("CA_Arm", name="R_Arm")

value = Arise.API.get_attr("{0}:Ctrls Scale".format(node_a))
Arise.API.set_attr("{0}:Ctrls Scale".format(node_b), value)



_____________________________________________

Get Arise at: https://www.ariserigging.com