class core.world.world.World[source]

Bases: openalea.core.scene.vplscene.VPLScene, openalea.grapheditor.observer.AbstractListener

Contain objects of the world.

When world changes, several events can be notified to listeners:
  • world_object_changed(world, changes)
  • world_object_replaced(world, key, old_object, new_object)
  • world_object_added(world, key, new_object)
  • world_object_removed(world, old_object)

A generic "world_changed" event is also notified for all previous changes.

Warning

currently only world_changed event is implemented

add(data, name=None, **kwargs)[source]

arguments:

  • transform: method used to convert object before representing it
  • _repr_*: define method used to convert object to a specific format (html, vtk, ...)
change_object_attribute(name, attribute)[source]
notify(sender, event=None)[source]
remove(name)[source]
sync()[source]
update_namespace(interpreter)[source]
class core.world.world.WorldObject(name, data, **kwargs)[source]

Bases: openalea.grapheditor.observer.Observed

Object of the world.

WorldObject contains :
  • name : world object identifier
  • data : the object itself
  • attributes : list of (name, Interface, value)
WorldObject provides meta-information like ...
  • origin
  • time required to compute object
  • visibility in scene
  • date when object has been added to scene
attribute(key)[source]
clear_kwargs()[source]
get(name, default_value=None)[source]
notify_listeners(event=None)[source]
set_attribute(name, value, interface=None, label=None, constraints=None)[source]
attributes[source]
data[source]
name[source]
obj[source]
silent[source]

Previous topic

core.world package

Next topic

<no title>

This Page