[Paraview] Change reader file name in python loaded state
Eric E. Monson
emonson at cs.duke.edu
Tue Feb 24 13:30:52 EST 2009
Okay, so this is just an issue with the XDMF reader. It still works
fine with the PVD reader.
To do this type of thing with XDMF, (after loading in the state file)
I have to create a new reader and representation, register them, then
change the input of the next element in the pipeline to the new reader.
Talk to you later,
-Eric
On Feb 19, 2009, at 7:35 PM, Eric E. Monson wrote:
> Hey again,
>
> Back maybe around PV 3.2, I could load a state file in Python
> (outside of PV) which included readers for pvd files. I could find
> the proxies for the file readers, and then change the file name,
> update the pipeline, and then save or display an animation using the
> new data set. I haven't tried this for a while because I'm now
> working with Xdmf files, and the reader didn't work with ParaView &
> Python well enough until more recently.
>
> Now, when I try the same scripts, the reader on which I change the
> file name doesn't show anything at all in the render view. (i.e. I
> have two readers in my pipeline -- if I don't change any file names
> I can load in the state file and animate fine -- if I change one
> file name only that element of my visualization drops out, but I can
> see and animate the other -- if I change both names the renderview
> looks blank during the whole animation.)
>
> I'm doing something like:
>
> from paraview import servermanger
> servermanager.Connect()
> servermanager.LoadState("/Users/emonson/Data/StateFile.pvsm")
> pm = servermanager.ProxyManager()
>
> reader = pm.GetProxy("sources","OriginalDataSet.xmf")
> reader.FileName = "/Users/emonson/Data/NewDataSet.xmf"
> reader.UpdatePipeline()
> view = servermanager.GetRenderView()
> view.StillRender()
>
> I see that in CVS there is a reader.FileNameChanged(), but calling
> that doesn't seem to fix it.
>
> Is there something obvious I'm failing to do, or does this look like
> this should work?
>
> Thanks,
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
> _______________________________________________
> 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
More information about the ParaView
mailing list