I got past the installation and am now trying
batch generation of images, in particular of
a triangular mesh.  At the top of my script,
following the nongui.py example, I have

import tables
import numpy
from enthought.mayavi import mlab
from enthought.mayavi.plugins.app import Mayavi, get_non_gui_plugins

class CrabCavity(Mayavi):

  def run(self):

# Then generate points and triangles

# Then at the bottom I have

# Create script and add triangles
    script = self.script
    script.new_scene()
    tmesh = mlab.triangular_mesh(points[:, 0], points[:, 1],
        points[:, 2], triangles)
    script.add_module(tmesh)

# Set the view
    s = script.engine.current_scene
    cam = s.scene.camera
    cam.azimuth(45)
    cam.elevation(15)
    s.render()
    s.scene.save("crabcav.png", size=(640,480))

if __name__ == '__main__':
  m = CrabCavity()
# Get the default non GUI plugins.
  plugins = get_non_gui_plugins()
# Start the app with these plugins.
  m.main(plugins=plugins)

which I run with python.

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.

What am I doing wrong?

Thanks....John Cary



------------------------------------------------------------------------------
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