Hey Ken,

Thanks for the response.

This doesn't answer your question but instead provides an alternative. You
can save the state as a python script. Since the point is to recreate the
state within a pvpython, this might be a more natural way to do it anyway.
The Python script should be straightforward to edit to use variables for
filenames instead of constants.

Sure, alternatives are always good to know about.  I just did some tests
though, and while I can basically use the same sed script (or vim commands)
to adjust the directory name, it seems as though the python version of
the state file does not capture the animation settings/cues, which I
suppose is a bug in the python-state writing method.

For example:

>>> from paraview.simple import *
paraview version 4.0.1
>>> servermanager.LoadState("testC2.pvsm")
>>> scene = GetAnimationScene()
>>> scene.Cues
[<paraview.servermanager.TimeAnimationCue object at 0x1d378d0>, <paraview.servermanager.CameraAnimationCue object at 0x1d37c10>]


Vs:

>>> execfile("testC2.py")
paraview version 4.0.1
>>> scene = GetAnimationScene()
>>> scene.Cues
[]


But I'll keep this in my expanding repertoire of how to learn what
python commands are available in pvpython!

-Ken

        Thanks,
        Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to