Bases: collections.OrderedDict, openalea.grapheditor.observer.Observed
Scene for OALab. Singleton.
This class inherit from ordered dict.
This scene also inherits from Observed, especially to know when Scene has changed.
(Notify listeners with world_changed event)
-
add(name='unnamed object', obj='None')[source]
Add a new object in the scene.
Parameters: |
- name -- name of the object to add in the scene
- obj -- object to add
|
-
block()[source]
Block sent of signals.
Useful to add many objects in the scene without refresh the viewer
-
clear()[source]
-
getScene()[source]
Returns: | the scene (ordered dict) |
-
popitem(last=True)[source]
-
release()[source]
Release signals sending and update scene.
-
rename(oldname, newname)[source]
Try to rename object named 'oldname' in 'newname'.
Parameters: |
- oldname -- str of the name of scene component to access
- newname -- str of the name to set
|
-
reset()[source]
clear the scene
-
update()[source]