[Paraview-developers] Dynamically generating GUI
Daniel Wilches Maradey
dwilches at gmail.com
Tue Jan 6 16:22:30 EST 2015
Hello again,
I'll post here what solution worked for me so other people can find it
(I modified a bit what you sent me in your last mail).
I've also updated the wiki with this info (why is there so many info
here in the mailing-list that has not reached the Wiki?).
In my XML I put this:
<StringVectorProperty command="SetCellArrayStatus"
element_types="2 0"
information_property="CellArrayInfo"
label="Cell Arrays"
name="CellArrayStatus"
number_of_elements="0"
number_of_elements_per_command="2"
repeat_command="1">
<ArrayListDomain name="array_list"
attribute_type="Scalars"
input_domain_name="inputs_array">
<RequiredProperties>
<Property name="Input"
function="Input" />
</RequiredProperties>
</ArrayListDomain>
</StringVectorProperty>
And now I see all the checkboxes next to the name of the arrays, and I
can select one or several of them.
Anyway, I haven't been able yet to get the list of checked arrays from
inside Python, but I'm starting to think I will need for that to make
a subclass of vtkProgrammableFilter in C++ to store the array in some
of its fields, Am I right about this?
Thanks
On Tue, Jan 6, 2015 at 10:45 AM, Daniel Wilches Maradey
<dwilches at gmail.com> wrote:
>
> Hi Cory,
>
> I think the 3rd point will solve my problem.
>
> Thanks for the information!
>
>
> On Tue, Jan 6, 2015 at 10:02 AM, Cory Quammen <cory.quammen at kitware.com> wrote:
> > Hi Daniel,
> >
> > It *may* be possible to do this with the ProgrammableFilter, but it's
> > not obvious to me how to do it. It would likely be easier to present a
> > combo box that lets you user pick one array on which to operate.
> >
> > Alternatively, you could write a C++ plugin and follow what I've
> > sketched out in this archived message to present the interface you've
> > described:
> >
> > http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/Servermanager-XML-Displaying-a-list-of-strings-along-with-selection-tp3134p3135.html
> >
> > Hope that helps,
> > Cory
> >
> > On Mon, Jan 5, 2015 at 4:23 PM, Daniel Wilches Maradey
> > <dwilches at gmail.com> wrote:
> >> Hello,
> >>
> >> I'm creating a ProgrammableFilter to process a source that has several
> >> arrays.
> >> I would like to create a GUI for it in which I present a checkbox for each
> >> data array, so I let the user decide upon which arrays the filter will be
> >> run.
> >> My problem is I'm not being able to find how to dynamically generate that
> >> GUI.
> >>
> >> Is there any way of accomplishing it ?
> >>
> >> Thanks.
> >>
> >>
> >> _______________________________________________
> >> Paraview-developers mailing list
> >> Paraview-developers at paraview.org
> >> http://public.kitware.com/mailman/listinfo/paraview-developers
> >>
> >
> >
> >
> > --
> > Cory Quammen
> > R&D Engineer
> > Kitware, Inc.
More information about the Paraview-developers
mailing list