[Paraview-developers] Filtered choice of attributes

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Nov 18 10:23:17 EST 2016


There isn't a prebuilt way, but you can subclass vtkSMArrayListDomain and
override vtkSMArrayListDomain::IsFilteredArray() to filter out arrays you
don't want and use that domain for your property.

On Fri, Nov 18, 2016 at 4:20 AM, Cornelis Bockemühl <
cornelis.bockemuehl at gmail.com> wrote:

> With this in the server manager xml it is possible to have the user select
> one of the available attributes in the input data:
>
> <StringVectorProperty command="SetMyAttribute"
> label="Select an attribute"
>                       name="MyTonnage"
>                       number_of_elements="1"
>                       panel_visibility="default">
>   <ArrayListDomain name="array_list">
>     <RequiredProperties>
>       <Property function="Input"
>                 name="Input" />
>     </RequiredProperties>
>   </ArrayListDomain>
>   <Documentation>
>     Whatever...
>   </Documentation>
> </StringVectorProperty>
>
> I have now a case where it would be desirable to constrain the selection
> to some of the attributes only, like with a filter function (best part of
> the C++ code of the plugin) that selects only some of the attributes based
> on their name.
>
> Is there any way how to achieve this?
>
> Thanks for any helpful hints!
>
> --
> Cornelis Bockemühl
> Basel, Schweiz
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161118/898bc8ce/attachment.html>


More information about the Paraview-developers mailing list