collada.scene.ControllerNode

class collada.scene.ControllerNode(controller, materials, xmlnode=None)

Bases: collada.scene.SceneNode

Represents a controller instance in a scene, as defined in the collada <instance_controller> tag. This class is highly experimental. More support will be added in version 0.4.

__init__(controller, materials, xmlnode=None)

Creates a controller node

Parameters:
  • controller (collada.controller.Controller) – A controller to instantiate in the scene
  • materials (list) – A list containing items of type collada.scene.MaterialNode. Each of these represents a material that the controller should be bound to.
  • xmlnode – When loaded, the xmlnode it comes from

Methods

__init__(controller, materials[, xmlnode]) Creates a controller node
load(collada, node) Load and return a class instance from an XML node.
objects(tipo[, matrix]) Yields a collada.controller.BoundController if tipo=='controller'
save() Saves the controller node back to xmlnode
controller = None

An object of type collada.controller.Controller representing the controller being instantiated in the scene

materials = None

A list containing items of type collada.scene.MaterialNode. Each of these represents a material that the controller is bound to.

xmlnode = None

ElementTree representation of the controller node.

objects(tipo, matrix=None)

Yields a collada.controller.BoundController if tipo=='controller'

static load(collada, node)

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()

Saves the controller node back to xmlnode