Previous topic

collada.material.Map

Next topic

collada.material.Sampler2D

This Page

collada.material.Material

class collada.material.Material(id, name, effect, xmlnode=None)

Bases: collada.DaeObject

Class containing data coming from a <material> tag.

Right now, this just stores a reference to the effect which is instantiated in the material. The effect instance can have parameters, but this is rarely used in the wild, so it is not yet implemented.

__init__(id, name, effect, xmlnode=None)

Creates a material.

Parameters:
  • id (str) – A unique string identifier for the material
  • name (str) – A name for the material
  • effect (collada.material.Effect) – The effect instantiated in this material
  • xmlnode – If loaded from xml, the xml node

Methods

__init__(id, name, effect[, xmlnode]) Creates a material.
load(collada, localscope, node)
save() Saves the material data back to xmlnode
id

The unique string identifier for the material

name

The name for the material

effect

The collada.material.Effect instantiated in this material

xmlnode

ElementTree representation of the surface.

save()

Saves the material data back to xmlnode