skinCluster

The SkinCluster class provides a simple interface to deal with skin clusters, also contains tools to save, and load skin clusters. Currently there are some known issues on the skin cluster.

  1. The save tool will fail if the indices of the skin cluster are not consecutive. This means if a joint has been removed from the skin cluster, and the indices no longer.

  2. The tool currently doesn’t save blend weights.

  3. Tool is not written currently with the API so it might not be the fastest option for loading.

class creators.skinCluster.SkinCluster(*args: Any, **kwargs: Any)

The main creator of skin clusters

classmethod by_name(skin_node_name)

A base Classmethod that returns an instance of the SkinCluster class that contains as the main node ( self.node) an skincluster with the name provided :param skin_node_name: A string that contains the name of a skinCluster in the scene. :type skin_node_name: str :returns: An instance of this SkinCluster class that has the skin_node_name assigned to the (self.node).

copy_by_definition(relation_dictionary, order_list=None)

Copies the skinning from joint to joint as described on the parameter relation dictionary. :param relation_dictionary: a dictionary of objects relations of which weights will be copyed where. And since the keys on the dictionary cant be repeated, the keys are the destination of the weights, and the value of the key is the joint from where the weights will be added. :param order_list: the order in which the copy should be done, since the dictionary doesnt have an order, this list should have the keys of the relation_dictionary. :return:

copy_skin(*args)

Copy’s the skinning between different meshes only by providing the meshes.

args[0]: the source mesh, this geo

args[1:]: the destination meshes where the skin will be copied

return: A list with all the skin clusters that where created during execution

switch_skin(geometry, joint_switch_dictionary)

Switches the joints in an existing skinning node. This is useful if you have a rig already done, and want to replace the joints that drive the deformation by new joints coming from a different rig. :param joint_switch_dictionary: a dictionary where keys are the old and the values are the new joints that are going to replace. :param geometry: geometry where the skin wants to be changed. :return: