collada.controller.Skin

class collada.controller.Skin(sourcebyid, bind_shape_matrix, joint_source, joint_matrix_source, weight_source, weight_joint_source, vcounts, vertex_weight_index, offsets, geometry, controller_node=None, skin_node=None)

Bases: collada.controller.Controller

Class containing data collada holds in the <skin> tag

__init__(sourcebyid, bind_shape_matrix, joint_source, joint_matrix_source, weight_source, weight_joint_source, vcounts, vertex_weight_index, offsets, geometry, controller_node=None, skin_node=None)

Create a skin.

Parameters:
sourceById

A dict mapping id’s to a collada source

bind_shape_matrix

A numpy array of floats (pre-shape)

joint_source

The string id for the joint source

joint_matrix_source

The string id for the joint matrix source

weight_source

The string id for the weight source

weight_joint_source

The string id for the joint source of weights

vcounts

A list with the number of influences on each vertex

vertex_weight_index

An array with the indexes as they come from <v> array

offsets

A list with the offsets in the weight index array for each source in (joint, weight)

geometry

The source geometry this should be applied to (geometry.Geometry)

controller_node

XML node of the <controller> tag which is the parent of this

skin_node

XML node of the <skin> tag if this is from there

Methods

__init__(sourcebyid, bind_shape_matrix, …) Create a skin.
bind(matrix, materialnodebysymbol) Create a bound morph from this one, transform and material mapping
load(collada, localscope, skinnode, …) Load and return a class instance from an XML node.
save() Put all the data to the internal xml node (xmlnode) so it can be serialized.
bind(matrix, materialnodebysymbol)

Create a bound morph from this one, transform and material mapping

static load(collada, localscope, skinnode, controllernode)

Load and return a class instance from an XML node.

Inspect the data inside node, which must match this class tag and create an instance out of it.

Parameters:
  • collada (collada.Collada) – The collada file object where this object lives
  • localscope (dict) – If there is a local scope where we should look for local ids (sid) this is the dictionary. Otherwise empty dict ({})
  • node – An Element from python’s ElementTree API
save()

Put all the data to the internal xml node (xmlnode) so it can be serialized.