openalea.core.scene package#

Submodules#

openalea.core.scene.vplscene module#

openalea.core.scene.vplscene.Scene#

alias of VPLScene

class openalea.core.scene.vplscene.VPLScene(*args, **kw)[source]#

Bases: OrderedDict, 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]#

Remove all items from ordered dict.

getScene()[source]#
Returns:

the scene (ordered dict)

popitem(last=True)[source]#

Remove and return a (key, value) pair from the dictionary.

Pairs are returned in LIFO order if last is true or FIFO order if false.

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([E, ]**F) None.  Update D from mapping/iterable E and F.[source]#

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

Module contents#