# Dynamic ParaView plugins using python

**URL:** https://discourse.paraview.org/t/dynamic-paraview-plugins-using-python/1793
**Category:** Development
**Tags:** python
**Created:** [May 8, 2019, 9:22am UTC](https://discourse.paraview.org/t/dynamic-paraview-plugins-using-python/1793 "2019-05-08T09:22:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![siver](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@siver](https://discourse.paraview.org/u/siver)
#### Post date: [May 8, 2019, 9:22am UTC](https://discourse.paraview.org/t/dynamic-paraview-plugins-using-python/1793/1 "2019-05-08T09:22:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 8, 2019, 11:54am UTC](https://discourse.paraview.org/t/dynamic-paraview-plugins-using-python/1793/2 "2019-05-08T11:54:40Z")

</div>

This can indeed be done in a custom widget [pqPropertyWidget](https://kitware.github.io/paraview-docs/latest/cxx/classpqPropertyWidget.html) 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](https://kitware.github.io/paraview-docs/latest/cxx/classpqCommandButtonPropertyWidget.html), and a complex one [pqScalarValueListPropertyWidget](https://kitware.github.io/paraview-docs/latest/cxx/classpqScalarValueListPropertyWidget.html).

Kitware provides [consulting services](https://www.kitware.com/what-we-offer/#custom_solutions) for such custom development as well.

---

<div class="post-metadata">

### Author: ![siver](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@siver](https://discourse.paraview.org/u/siver)
#### Post date: [May 8, 2019, 12:09pm UTC](https://discourse.paraview.org/t/dynamic-paraview-plugins-using-python/1793/3 "2019-05-08T12:09:21Z")

</div>

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
