[Paraview] vtkSMProxy saving/restoring

Nehme Bilal nbilal at mirarco.org
Wed Nov 19 08:47:31 EST 2008


Hello,

Sorry I missed a few commas in the last message. this is 
the correct one:

I am looking for a way to save a proxy properties and 
restore it later.
The only way I found is by saving and restoring the state 
using:
virtual vtkPVXMLElement* SaveState(vtkPVXMLElement* root);
virtual int LoadState(vtkPVXMLElement* element, 
vtkSMStateLoaderBase* loader);

I don't want to use LoadState because this method create a 
new proxy. I just want to restore all properties to the 
existing proxy.
There is also a method called Copy (void Copy(vtkSMProxy* 
src), this method will copy all src properties to another 
proxy:

//copying properties to tempProxy
tempProxy->Copy(src,0,vtkSMProxy::COPY_PROXY_PROPERTY_VALUES_BY_CLONING);

I tried to change some display properties in Paraview and 
then restore using:
src->Copy(tempProxy,0,vtkSMProxy::COPY_PROXY_PROPERTY_VALUES_BY_CLONING);
src->UpdateVTKObjects();

but nothing is restored ! why? Is there any other way to 
do that?
(suppose that I have only on source)

Thank you




More information about the ParaView mailing list