[Paraview-developers] Custom plugin drop down list

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Sat Feb 10 07:24:30 EST 2018


Dan,

If I understand your use-case correctly, what you can do is a combination
of StringListDomain with an info property that returns the available
options e.g.

      <StringVectorProperty command="GetAllDimensions"
                            information_only="1"
                            name="DimensionInfo">
        <StringArrayHelper />
      </StringVectorProperty>
      <StringVectorProperty animatelable="0"
                            command="SetDimensions"
                            name="Dimensions"
                            number_of_elements="1"
                            panel_visibility="default">
        <StringListDomain name="array_list">
          <RequiredProperties>
            <Property function="ArrayList"
                      name="DimensionInfo" />
          </RequiredProperties>
        </StringListDomain>
        <Documentation>Load the grid with the given dimensions. Any arrays that
        conform to these dimensions will be loaded.</Documentation>
      </StringVectorProperty>


Hope that helps,
Utkarsh

On Thu, Feb 8, 2018 at 6:08 AM, TUTHILL-JONES, DAN E. (Student) <
d.e.tuthill-jones at durham.ac.uk> wrote:

> Hi,
>
>
> Firstly apologies if this is the wrong place to post this king of thing.
>
> I'm currently working on a reader plugin for paraview but I'm having a few
> issues with writing the XML for the GUI. the files I'm using contain
> multiple separate datasets and I'd like them to appear in a drop down box
> of which only one is selectable. I've been looking at the wiki page here:
> https://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Adding_GUI_Parameters and
> various posts here but haven't been able to get exactly what I want
> working. I did manage to get the other drop down list working (the one
> where you can select/deselect each item). This uses some set and get
> methods in my reader's class and seemed to work very well. Unfortunately I
> haven't been able to apply this to the drop down box where only a single
> item is selectable.
>
>
> Could anybody explain to me how the XML works or point me towards a
> thorough resource?
>
>
> Thanks,
>
> Dan
> ParaView/Plugin HowTo - KitwarePublic
> <https://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Adding_GUI_Parameters>
> www.paraview.org
> Introduction. ParaView comes with plethora of functionality bundled in:
> several readers, multitude of filters, quite a few different types of views
> etc.
>
>
> _______________________________________________
> 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:
> https://paraview.org/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180210/0c318dd3/attachment.html>


More information about the Paraview-developers mailing list