[Paraview-developers] Custom object panels deprecated?

Cory Quammen cquammen at cs.unc.edu
Fri Feb 15 17:09:51 EST 2013


Hi Kyle,

Thanks for your response. I got the proxy/sub-proxy pattern to work
more or less. It's a little awkward, but workable.

My next challenge is that I want to have a property type that would
best be displayed as a table with several columns (e.g., the table
that shows the points in the Spline Source). The number of rows in the
table would be dynamic. Let's say it's basically a vtkTable. This
doesn't map to one of the canonical ParaView property types as far as
I know. It seems that the custom object panel mechanism would let me
set this up pretty easily. With the new custom widget approach, would
I have to define a custom TableProperty type as well as the custom
widget for that type?

Thanks,
Cory

On Fri, Feb 15, 2013 at 4:18 PM, Kyle Lutz <kyle.lutz at kitware.com> wrote:
> 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



--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Paraview-developers mailing list