[Paraview] Problem changing InputFile property of CVSReader

Luca.Clementi at tororosso.com Luca.Clementi at tororosso.com
Fri May 14 03:52:09 EDT 2010



Hi all,
I have saved the state of a pipeline diffCP.pvsm where I have to two
CVSReader then two table to point, a delaunay2d, a resample and a
ProgrammableFilter to do the diff.
In the sample code attached below Im trying to change the two input file
name used in the CVSReader (Input1, Input2) and then run the pipeline to
get an immage.

But when I run this script the produced png is always referring to the
original two input files that where stored in the pvsm file no matter what
I put in inputFile1 or inputFile2. It's like if the InputFile property
doesn't get updated by my code.

I tried the code with both 3.6.2 and the trunk CVS of ~20 days ago.

Am I missing something?


Thanks for your help,
Luca

-------------------------------------------------------------------
servermanager.Connect()
servermanager.LoadState("diffCP.pvsm")
pm = servermanager.ProxyManager()
#changing input1 and input2 fileNames
for (pName, pId), pObject in pm.GetProxiesInGroup("sources").iteritems():
    if (pName == "Input1"):
        print "setting Input1 from " + str(pObject.FileName) + " to " +
        inputFile1
        pObject.FileName=inputFile1
        pObject.FileNameInfo=inputFile1
        pObject.UpdateProperty("FileName")
        pObject.UpdateProperty("FileNameInfo")
        #pObject.UpdatePipelineInformation
    elif (pName == "Input2"):
        print "setting Input2 from " + str(pObject.FileName) + " to " +
        inputFile2
        pObject.FileName=inputFile2
        pObject.FileNameInfo=inputFile2
        pObject.UpdateProperty("FileName")
        pObject.UpdateProperty("FileNameInfo")

view = servermanager.GetRenderView()
view.StillRender()
view.ViewSize=[1280,640]
view.WriteImage("diffCP.png", "vtkPNGWriter", 1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100514/946d7015/attachment.htm>


More information about the ParaView mailing list