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. <[email protected]> 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
