collada.controller.Morph

class collada.controller.Morph(source_geometry, target_list, xmlnode=None)

Bases: collada.controller.Controller

Class containing data collada holds in the <morph> tag

__init__(source_geometry, target_list, xmlnode=None)

Create a morph instance

Parameters:
source_geometry

The source geometry (Geometry)

targets

A list of tuples where each tuple (g,w) contains a Geometry (g) and a float weight value (w)

xmlnode

When loaded, the xmlnode it comes from

Methods

__init__(source_geometry, target_list[, xmlnode]) Create a morph instance
bind(matrix, materialnodebysymbol) Create a bound morph from this one, transform and material mapping
load(collada, localscope, morphnode, …) 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.
source_geometry = None

The source geometry (Geometry)

target_list = None

A list of tuples where each tuple (g,w) contains a Geometry (g) and a float weight value (w)

bind(matrix, materialnodebysymbol)

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

static load(collada, localscope, morphnode, 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.