[Paraview] Singleton vtkObject multiple SMProxies
Biddiscombe, John A.
biddisco at cscs.ch
Thu Jun 17 09:56:33 EDT 2010
Further to my last message. I see that you've overridden the getProxy in the SMAdaptiveOptionsProxy class. This is good. They can all reuse the same underlying proxy. I tried using a singleton SMproxy itself - I see your way is better - no connection ID problem.
Now I just need to get the filter to take one as a param...
Thanks for the clues. I think I'm getting close.
JB
> -----Original Message-----
> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org]
> On Behalf Of Biddiscombe, John A.
> Sent: 17 June 2010 15:46
> To: David E DeMarle
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] Singleton vtkObject multiple SMProxies
>
> Dave,
>
> Thanks, I see the adaptive options stuff. You are manually creating the
> SMAdaptiveoptionsProxy - which is ok if you have a custom panels - I do for
> one window, but the others are autogenerated, and I want them to pick up the
> same proxy (and custom panel for the sub proxy) - I tried creating a
> singleton proxy but can't make it work and on plugin load it instantiates
> one, then when I try to use it in a filter - the connection Id changes when
> instantated the second time and paraview gives me grief.
>
> to try to explain better ...
>
> you have
> <AdaptiveOptionsProxy name="AdaptiveOptions" class="vtkAdaptiveOptions">
> ...
> </AdaptiveOptionsProxy>
>
> which is nice, it instantiates a vtkSMAdaptiveOptions which is a custom
> SMProxy. All is well, but when I try to use this as a sub proxy on a filter.
> Paraview ain't happy
>
> <SourceProxy name="Annoyingfilter" class="vtkAnnoyingFilter">
> <SubProxy>
> < AdaptiveOptionsProxy
> name = blah blah
> This bit ain't working in here.
> </ AdaptiveOptionsProxy >
> </SubProxy>
>
> I can't make it use my custom proxy as a filter param sub proxy (or use my
> panel either)
>
> any ideas?
>
> JB
>
>
> > -----Original Message-----
> > From: David E DeMarle [mailto:dave.demarle at kitware.com]
> > Sent: 17 June 2010 15:22
> > To: Biddiscombe, John A.
> > Cc: paraview at paraview.org
> > Subject: Re: [Paraview] Singleton vtkObject multiple SMProxies
> >
> > Utkarsh will probably say there is a better way to do it, but in the
> > mean time take a look at how that pattern is implemented for the
> > streaming applications.
> >
> > There I used a singleton to store system wide options where things
> > like the number of render passes and the state of debug flags. Long
> > ago that state was right in the vtkPVProcessModule, but I eventually
> > moved it out of there and did it this more convoluted way so a not to
> > pollute the main application with streaming specific code.
> >
> > See:
> > Applications/AdaptiveParaView/Plugin/
> > vtkAdaptiveOptions - the 'singleton', for which one exists on all
> > processes and all have identical contents
> > vtkSMAdaptiveOptionsProxy - the servermanager access to the above
> > pqGlobalAdaptiveViewOptions - one place in the GUI where the use can
> > change the contents
> > all over in that directory - code that uses the values in the singleton
> >
> > David E DeMarle
> > Kitware, Inc.
> > R&D Engineer
> > 28 Corporate Drive
> > Clifton Park, NY 12065-8662
> > Phone: 518-371-3971 x109
> >
> >
> >
> > On Thu, Jun 17, 2010 at 6:26 AM, Biddiscombe, John A. <biddisco at cscs.ch>
> > wrote:
> > > I have a singleton vtkObject, but multiple paraview panels and other
> items
> > > use it via proxies which are created independently.
> > >
> > >
> > >
> > > I'd like changes in any one to be propagated to all, but need to connect
> > the
> > > underlying vtkObject modified event to the proxies - the proxy doesn't
> > seem
> > > to do this automatically. Is there a way to achive this? (is it possible
> > to
> > > use a singleton SMproxy? that'd solve the problem I'm sure).
> > >
> > >
> > >
> > > Secondly : I have a custom panel for the object, when I instantiate a
> > filter
> > > with a proxyproperty
> > >
> > > <ProxyProperty name="SPHManager"
> > >
> > > command="SetSPHManager">
> > >
> > > <ProxyGroupDomain name="groups">
> > >
> > > <Group name="meshless_helpers"/>
> > >
> > > </ProxyGroupDomain>
> > >
> > > <ProxyListDomain name="proxy_list">
> > >
> > > <Proxy group="meshless_helpers"
> > >
> > > name="SPHManager" />
> > >
> > > </ProxyListDomain>
> > >
> > > </ProxyProperty>
> > >
> > >
> > >
> > > it doesn't call the plugin to to try to create the panel. It works ok,
> for
> > a
> > > panel that represents a whole filter. And it works for a panel for a
> > widget
> > > (proxy property), but it doesn't work for an arbitrary proxyproperty. Is
> > > there a way to make it work?
> > >
> > >
> > >
> > > thanks
> > >
> > >
> > >
> > > JB
> > >
> > >
> > >
> > > --
> > >
> > > John Biddiscombe, email:biddisco @ cscs.ch
> > >
> > > http://www.cscs.ch/
> > >
> > > CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
> > >
> > > Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> > >
> > >
> _______________________________________________
> 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