gui elements created dynamically

(Marco Accardo) #1

Is it possible using python plugin/live-source to have the gui pane dynamically populated at run time.
after importing an stl file I want to put a range control on the gui based on the data i just read in.
I see how to define things statically with decorators and such but cannot find if its possible for dynamic creation.

(Mathieu Westphal (Kitware)) #2

It may be possible to do something close but you will have to give more details and contexts.

(Marco Accardo) #3

let me try then.
I bring in a geometry file of a part using just basic paraview file open.
I now have a external data file that contains x,y,z coordinates, value, value type .
The x,y,z coordinates align/map to a point on the part.
My goal is to show the value of a particular value type on my part ideally via a arrow showing magnitude and directions (in/out from face of part at the point).
I am trying to see what the simplest/easiest approach would be using python and paraview.
I have been reading about filters, programmable sources, plugins and it appears to have a very rich landscape but I am having trouble picking a direction.
The idea behind the dynamic gui population is that the I would use the value type infomation as a way of deciding which values to show. So the value types are not known till you read the file and I wanted a way to select/show only x,y,x values for a selected value type in the external file.

Hope this give a bit more context.

(Mathieu Westphal (Kitware)) #4

Sounds like you can just read your file and use the glyph filter or the glyph representation.

(Marco Accardo) #5

I ended up making a custom reader based off the csv pyhon reader and got the data into a table, then used tableToPoints followed by add glyph to my pipeline.

I would of liked add the glyh directly from the reader but could not find any examples that made glyphs from tables within a python plugin…