Hi, I have two basic questions about scripting mayavi:
1) I have written a script 'script.py' that runs fine turning the GUI on: mayavi2 -x script.py and does not work with the option -o (offscreen): mayavi2 -x script.py -o The script is here: ------ mayavi.new_scene() s = mayavi.engine.current_scene vtk_file_reader = engine.open(u'my_file_0010.vtk', s) from enthought.mayavi.modules.api import Outline, IsoSurface o = Outline() mayavi.add_module(o) o.actor.property.color = 1, 0, 0 iso = IsoSurface() mayavi.add_module(iso) iso.actor.property.opacity = 0.4 s.scene.save('test_0010.png') ------ how could I make it work offscreen? 2) I would like to create an animation starting from this script, by generating a series of images with mayavi. How can I make some kind of loop in order to read my files (my_file_0010.vtk, my_file_0020.vtk, ...) and generate outputs (test_0010.png, test_0020.png, ...), possibly with an offscreen option? I apologize for being completely new to python. thanks for your suggestions! giovanni ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users