collada.material.Material¶
- class collada.material.Material(id, name, effect, xmlnode=None)¶
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)Load and return a class instance from an XML node.
save
()Saves the material data back to
xmlnode
Attributes
xmlnode
ElementTree representation of the surface.
id
The unique string identifier for the material
name
The name for the material
effect
The
collada.material.Effect
instantiated in this material