Hi Osman,
below is a hack that might help you. In terms of sfepy's Viewer, it should read:
# Workaround for 'scene = gui.scene.mayavi_scene' e = mlab.get_engine() for scene in e.scenes: if scene.scene.render_window is gui.scene.scene_editor.render_window: print 'Yeah' break
r. PS: Thanks, Gael!
-------- Original Message -------- Subject: Re: [Fwd: Re: [SciPy-User] ANN: SfePy 2009.4] Date: Wed, 25 Nov 2009 15:20:40 +0100 From: Gael Varoquaux To: Robert Cimrman
On Wed, Nov 25, 2009 at 03:11:39PM +0100, Robert Cimrman wrote:
is there a way to get a mayavi_scene from a MlabSceneModel instance in mayavi 3.1.0? I guess something like
engine = mlab.get_engine() scene = engine.<get the scene that corresponds to the MlabSceneModel instance>
Not really something like that. It's a really design flaw, that we realized a bit late.
Here is a hack (my_model.scene is the MlabSceneModel instance):
for scene in e.scenes: if scene.scene.render_window is my_model.scene.scene_editor.render_window: print 'Yeah'
HTH,
Gaƫl
participants (1)
-
Robert Cimrman