collada.common.DaeObject¶
-
class
collada.common.
DaeObject
¶ Bases:
object
This class is the abstract interface to all collada objects.
Every <tag> in a COLLADA that we recognize and load has mirror class deriving from this one. All instances will have at least a
load()
method which creates the object from an xml node and an attribute calledxmlnode
with the ElementTree representation of the data. Even if it was created on the fly. If the object is not read-only, it will also have asave()
method which saves the object’s information back to thexmlnode
attribute.-
__init__
()¶ x.__init__(...) initializes x; see help(type(x)) for signature
Methods
load
(collada, localscope, node)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. -
xmlnode
= None¶ ElementTree representation of the data.
-
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
-
save
()¶ Put all the data to the internal xml node (xmlnode) so it can be serialized.
-