[Paraview-developers] [EXTERNAL] Deprecating old-panels from ParaView

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Aug 16 18:16:36 EDT 2013


John,

You can find  the pqPipelineRepresentation corresponding to the proxy
using the following:

pqServerManagerModel* smmodel =
pqApplicationCore::instance()->getServerManagerModel();
pqPipelineRepresentation* repr =
smmodel->findItem<pqPipelineRepresentation*>(proxy);

But note as you noted, both the proxy passed into the constructor of
the pqPropertyWIdget as well as the pqPipelineRepresentation* returned
by the above code will correspond to the "outer" representation i.e.
the "UniformGridRepresentation" and not the "OpacityRepresentation".
That behavior has hasn't changed. The pqPipelineRepresentation
accessible by the add_display_panel_decorator(...) was indeed
corresponding to the "outer" representation.

Utkarsh


On Fri, Aug 16, 2013 at 4:37 PM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> Using the old style panels, and in particular the
> add_display_panel_decorator for a custom representation, I was able to get
> the pqPipelineRepresentation object which encapsulated my custom
> representation.
>
>
>
> If I try to add a pqPropertyWidget subclass to my project, and make it an
> editor for a property of my custom representation, I have a problem.
>
>
>
> The PropertyWidget is created as expected and shows up on the panl (very
> nice, I like it so far), the trouble is that
>
>     <Extension name="UniformGridRepresentation">
>
>
>
>       <!-- this adds to what is already defined in PVRepresentationBase -->
>
>       <RepresentationType
>
>         subproxy="OpacityRepresentation"
>
>         text="Custom Volume"/>
>
>
>
>       <SubProxy>
>
>         <Proxy name="OpacityRepresentation"
>
>           proxygroup="representations"
>
>           proxyname="OpacityGradientVolumeRepresentation" />
>
>
>
> The representation is created as an extension to the UniformGrid master
> representation, when the property exposed from the
> OpacityGraidientVolumeRepresentation into the top level representation is
> created , the widget is constructed with the proxy for the parent
> representation object. Since vtkSMProxy GetSubProxy() is protected/private,
> I can’t iterate over the sub proxies and find the one that corresponds  to
> my actual representation.
>
>
>
> Since my custom representation does need a load of information about the
> representation for the widgets to function – how do I gain access to the
> pqPipelineRepresentation that encapsulates my custom representation?
>
>
>
> thanks
>
>
>
> JB
>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list