The Scene class is a container for anything that should also be visible to other objects. The "visible" part of the scene is called the world which is what gets rendered on screen (everything that has a coordinate system is part of the world). However, the scene can also contain objects that are not part of the world. For example, the global timer or any other object that is used somehow but has no direct visible representation.
You can retrieve the global scene object by calling the function getScene().
| ) |
If a script is invoked via a tool such as the viewer or render tool,
the variable scene is automatically initialized with the global
scene object. To inspect what objects the scene currently contains,
you can just iterate over a scene:
>>> for item in scene: print item ... <cgkit.timer.Timer object at 0x0907FEA0> <cgkit.worldobject.WorldObject object at 0x0907FE70>
This is what an empty scene looks like. The two scene items you see here are the globel timer and the root object of the world. These objects are automatically created by the scene.
The scene object has the following attributes and methods:
'l' or 'r'.
The default is right handed.
| ) |
| root=None) |
| ) |
| ) |
| item) |
| name) |
| name) |
| ) |
| joystick) |
| id) |
| name) |
True if a global option with name name exists.
| name, default=None) |
| name, value) |