openalea.oalab.scene package

Submodules

openalea.oalab.scene.view3d module

class openalea.oalab.scene.view3d.Viewer(session, controller, parent=None)[source]

Bases: openalea.grapheditor.observer.AbstractListener, openalea.oalab.scene.view3d.view3D

Widget of 3D Viewer to show the scene.

actions()[source]
mainMenu()[source]
Returns:Name of menu tab to automatically set current when current widget

begin current.

notify(sender, event=None)[source]
resetzoom()[source]
setScene(scenes)[source]

Set the scene (erase old scene if necessary)

Class overloaded to use an autofocus if you add a first object in the scene

Parameters:scene – dict with every sub-scenes to add
show_entire_scene()[source]
show_fps()[source]
show_hide_axis()[source]
show_hide_grid()[source]
zoomin()[source]
zoomout()[source]
openalea.oalab.scene.view3d.main()[source]
class openalea.oalab.scene.view3d.view3D(parent=None, scene=None, statefilename='.temp_scene.xml', shareWidget=None)[source]

Bases: PyQGLViewer.QGLViewer

This class is used to create and manipulate a 3 dimensions scene. This scene is based on QGLViewer. For the moment, we have only one view of this scene.

addToScene(obj)[source]

Add a new object in existing scene

Parameters:obj – object to add in the scene
defaultScene()[source]

Create a default scene. Here she is empty.

Returns:the scene
draw()[source]

Draw the scene

getScene()[source]
Returns:the scene (orderedDict)
plot(scene)[source]
save(fname, format)[source]
selection()[source]
setScene(scenes)[source]

Set the scene (erase old scene if necessary)

Parameters:scene – dict with every sub-scenes to add
start()[source]
update_radius()[source]

Set the scene radius to 110% of the max size in the scene

waitSelection(txt)[source]

openalea.oalab.scene.vplscene module

openalea.oalab.scene.vplscene.Scene

alias of VPLScene

class openalea.oalab.scene.vplscene.VPLScene(*args, **kwds)[source]

Bases: collections.OrderedDict, openalea.grapheditor.observer.Observed

Scene for OALab. Singleton.

This class inherit from ordered dict. But when the dict is modified, self.signaler emit a qt signal (arg=self). This is really usefull to realize automatic updates of viewer!

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)
instance = None
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]

Module contents