[Paraview] Save State/adding custom property

michal wozniak michalwozniak at live.ca
Tue May 31 11:50:35 EDT 2016


That's exactly what I was looking for.
thanks a lot for the great support !!!

> Date: Mon, 30 May 2016 08:10:48 -0400
> Subject: Re: [Paraview] Save State/adding custom property
> From: utkarsh.ayachit at kitware.com
> To: michalwozniak at live.ca
> CC: paraview at paraview.org
> 
> There's a preexisting feature called "annotation" that vtkSMProxy
> supports via the following API. Seems to me that'd map well to what
> you're trying to do with the "user" property.
> 
> void SetAnnotation (const char *key, const char *value)
> const char * GetAnnotation (const char *key)
> void RemoveAnnotation (const char *key)
> void RemoveAllAnnotations ()
> bool HasAnnotation (const char *key)
> int GetNumberOfAnnotations ()
> const char * GetAnnotationKeyAt (int index)
> 
> Utkarsh
> 
> On Sun, May 29, 2016 at 1:37 PM, michal wozniak <michalwozniak at live.ca> wrote:
> > Hi everyone,
> >
> > I am trying to add a custom property to the state xml.
> >
> > For eg:
> >
> > I loaded object.stl and did a slice on it. Then, I saved the state and went
> > to look at the XML.
> >
> > <ProxyCollection name="sources">
> >       <Item id="4031" name="Slice1"/>
> >       <Item id="3783" name="object.stl"/>
> >  </ProxyCollection>
> >
> > I want to add an extra property called "user"
> >
> > <ProxyCollection name="sources">
> >       <Item id="4031" name="Slice1" user="dev"/>
> >       <Item id="3783" name="object.stl" user="basic"/>
> >  </ProxyCollection>
> >
> > the extra property will be added during the saving of the state. I will be
> > changing user property using a widget.
> > I just want to know how to send the value of my variable user to be printed
> > in the xml.
> >
> > I have been looking at a couple of classes  vtkSMStateVersionController,
> > vtkSMStateLoader, vtkSMProperty.
> > I got confused after looking at so many classes related to this.  Do i need
> > to register my variable or send it using a specific function?
> > Is there some documentation/tutorial for this?
> >
> > thanks
> >
> > Michal Wozniak
> >
> >
> >
> >
> > _______________________________________________
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
> >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160531/cc8593a5/attachment.html>


More information about the ParaView mailing list