simphony / simphony-mayavi

The mayavi adapters to the simphony framework
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Replace load from py with Mayavi2 RunScript #143

Closed kitchoi closed 8 years ago

kitchoi commented 8 years ago

Fix #142

This assumes that branch refactor-engine-factory #130 would be merged. Likely to cause clashes in plugin.py and api.py with #134.

Usage:

Save the following into a script and run it within Mayavi2.

# do a bunch of stuff setting up a modeling engine
engine = ...

from simphony.visualisation import mayavi_tools
mayavi_tools.add_engine_to_mayavi2("engine_name", engine)
kitchoi commented 8 years ago

The Add-engine panel now looks like this (again, with branch refactor-engine-factory) User can add an engine to the panel in Mayavi2 by running a script (File->Run Python Script) like the one in examples/lammps_engine_example.py (__file__ is not recognised at the moment https://github.com/enthought/mayavi/pull/284) panel

If the simphony-mayavi plugin is not loaded in Mayavi2, an error is shown. error

@itziakos , @dpinte ready for review