collada.scene.Scene¶
-
class
collada.scene.
Scene
(id, nodes, xmlnode=None, collada=None)¶ Bases:
collada.common.DaeObject
The root object for a scene, as defined in a collada <scene> tag
-
__init__
(id, nodes, xmlnode=None, collada=None)¶ Create a scene
Parameters: - id (str) – A unique string identifier for the scene
- nodes (list) – A list of type
collada.scene.Node
representing the nodes in the scene - xmlnode – When loaded, the xmlnode it comes from
- collada – The collada instance this is part of
Methods
__init__
(id, nodes[, xmlnode, collada])Create a scene load
(collada, node)Load and return a class instance from an XML node. objects
(tipo)Iterate through all objects in the scene that match tipo. save
()Saves the scene back to xmlnode
-
id
= None¶ The unique string identifier for the scene
-
nodes
= None¶ A list of type
collada.scene.Node
representing the nodes in the scene
-
collada
= None¶ The collada instance this is part of
-
xmlnode
= None¶ ElementTree representation of the scene node.
-
objects
(tipo)¶ Iterate through all objects in the scene that match tipo. The objects will be bound and transformed via the scene transformations.
Parameters: tipo (str) – A string for the desired object type. This can be one of ‘geometry’, ‘camera’, ‘light’, or ‘controller’. Return type: generator that yields the type specified
-
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
-