WriteScript

VisIt's Python interface provides a function called WriteScript that is meant to be able to write out the current state of VisIt to a Python script that can be used later to reproduce a visualization. This is like using a session file but you can take the output of WriteScript and further customize it.

Since the WriteScript function is available in VisIt's Python interface, you can call it like this:

f = open("script.py", "wt")
WriteScript(f)
f.close()

The resulting script will contain commands to set up plots in any visualization window that contained plots when WriteScript was called. You may want to edit the resulting script file since it may be verbose, depending on how many plots you have or the complexity of the data file. For example, you might want to remove the code related to setting a plot's SIL restriction.

Once you have edited the script to your satisfaction, you can replay it in VisIt like this:

visit -cli -s script.py

Or, you can even use the script with VisIt's movie scripts as a means to set up your visualization:

visit -movie -format mpeg -geometry 800x800 -scriptfile script.py -output scriptmovie