[Paraview-developers] Custom object panels deprecated?

Kyle Lutz kyle.lutz at kitware.com
Fri Feb 15 16:18:21 EST 2013


On Fri, Feb 15, 2013 at 2:01 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Perusing the ParaView plugin documentation at
>
> http://www.paraview.org/Wiki/ParaView/Plugin_HowTo
>
> I see that custom object panels are deprecated. Is that still the case?
>
> If so, what is the suggested path for exposing filter or source
> parameters that don't fit into the well-established integer, boolean,
> string, and double properties, etc. for which the automatic GUI
> generation works so well?
>
> For example, say I have a custom VTK source that I am exposing in
> ParaView via the plugin mechanism. This VTK source has a method that
> takes a pointer to a base class of some non-VTK object defined in an
> external library, say
>
> SetBaseClass( BaseClass * base )
>
> I would like to provide a drop down list enabling the user to choose
> which subclass of this base class should be instantiated and set
> through this method. Now, I could do this with an enumeration by
> providing a
>
> SetBaseClass(int enumerant)
>
> method and taking care of instantiating the base class inside my VTK
> object. However, each subclass has different properties that I would
> like to expose in the object panel whenever that type of subclass is
> selected in the menu. A close analogy that exists in ParaView is the
> Glyph Filter. This filter enables you to choose the glyph source from
> a menu. When you change the glyph type, the settings for the glyph
> source appear in the object panel.
>
> To me, the simplest thing would be for me to write a custom object
> panel and take care of all the non-VTK stuff there. But if that
> approach isn't going to be supported in the future, I obviously don't
> want to pursue that.
>
> Any suggestions are greatly appreciated!

Hi Cory,

You're correct, the custom object panel mechanism from previous
ParaView versions is now deprecated. The new mechanism is to specify a
custom widget for your property. See
http://www.vtkedge.org/Wiki/Properties_Panel#Custom_Panel_Widgets for
more information.

As of now custom widgets must be implemented in ParaView/VTK. In the
future this will be extended to allow plugins to register their own
custom widgets.

The glyph filter and clip filter panels have a combo box which
controls the sub-proxy used (for the source and implicit function
respectively). The property type that generates this is a
ProxyProperty with a ProxyListDomain. When the combo box the
properties for the select sub-proxy are displayed. If this pattern
works for your use case it would probably be the best solution.

-Kyle


More information about the Paraview-developers mailing list