On Mon, May 25, 2009 at 09:53:08AM -0600, John R. Cary wrote:
> It seems that the gui always comes up.  I just want to
> create my scene and save it in a png without the GUI
> coming up.

You are looking for offscreen rendering. I have sketched modifications to
your script that should do it:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import tables
import numpy
from enthought.mayavi import mlab
mlab.options.offscreen = True

def run():
  
    # Then generate points and triangles

    # Then at the bottom I have

    # Create script and add triangles
    tmesh = mlab.triangular_mesh(points[:, 0], points[:, 1],
                                    points[:, 2], triangles)
   
    # Set the view
    mlab.view(45, 15)
    mlab.savefig("crabcav.png", size=(640,480))

if __name__ == '__main__':
    run()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

You should also read 
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/tips.html#off-screen-rendering
as to avoid having a window poping up, you may need to do more, depending
on your platform.

HTH,

Gaƫl


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to