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