Dynamic ParaView plugins using python

Dear PV devs,

Greetings. To put it briefly, I am attempting to write a PV plugin that reads a case and shows array names with respective buttons/sliders/etc next to them, i.e. if there are 3 variables, show 3 buttons, if 10 then 10.

The ultimate goal is to modify data arrays on the fly and visualize them, each array independently via respective buttons/sliders/fields. My questions are:

  • Are xml files too rigid for this?
  • Are widgets and decorators the right way to go?
  • (most importantly) Can it be done in pure python? Or do I need to C++ and compile. Could you point me to some examples in the former case (or the latter if inevitable).

My best wishes and deep gratitude,
Art

This can indeed be done in a custom widget pqPropertyWidget subclass. It will have to be a C++ plugin. Depending on your experience with C++, Qt, VTK, this can get tricky very quickly. I’d start by looking at other widget subclasses e.g. a simple one pqCommandButtonPropertyWidget, and a complex one pqScalarValueListPropertyWidget.

Kitware provides consulting services for such custom development as well.

Thank you for your prompt reply, Utkarsh!

And for confirming my guesses (deepest fears). I’ll check your links and try to learn some C++. Thanks a lot.

Best,
Art