# Porting an existing VisIt plugin

**URL:** https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410
**Category:** ParaView Support
**Created:** [February 7, 2021, 2:45pm UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410 "2021-02-07T14:45:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![henry2004y](https://discourse.paraview.org/user_avatar/discourse.paraview.org/henry2004y/32/2296_2.png) [@henry2004y](https://discourse.paraview.org/u/henry2004y)
#### Post date: [February 7, 2021, 2:45pm UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410/1 "2021-02-07T14:45:32Z")

</div>

Hi,

I am not familiar with the plugin workflow in ParaView. I notice a few years ago a new `VTKPythonAlgorithmBase` is introduced to quickly build a customized plugin, while the old way seems to be relying on some XML files.

Now I have a [VisIt plugin written in C++](https://github.com/fmihpc/vlsv/tree/master/visit-plugin). In VisIt, a tool called `xml2cmake` is used to convert the XML file to CMake and then compile the plugin. What is the proper way to port this existing plugin to ParaView? Can I build it directly with [ParaViewPluginBuilder](https://gitlab.kitware.com/paraview/paraview-plugin-builder))? Do I need to build ParaView myself with [VisIt Database Bridge](https://www.paraview.org/Wiki/VisIt_Database_Bridge)? Or is it possible to just write a pure Python script by using `VTKPythonAlgorithmBase`?

I also found a example of this in [Examples/Plugins/VisItReader](https://gitlab.kitware.com/paraview/paraview/-/tree/master/Examples/Plugins/VisItReader). The demo files contains a `CMakeLists.txt`, which I guess can be used to compile the C source code directly with cmake? If this is working, maybe I should first try to build this locally.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [February 8, 2021, 9:00am UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410/2 "2021-02-08T09:00:29Z")

</div>

VisIt plugins as shown in the Examples dir are not anymore supported. Some work is in progress to re-enable them (maybe for PV 5.10 ?)

For now, the simplest way is to put your VisIt reader in the ‘Utilities/VisitBridge/Databases/readers’ directory of ParaView, add it to the ‘DataBases/CMakeLists.txt’ and build ParaView with `PARAVIEW_ENABLE_VISITBRIDGE` to `ON`.

---

<div class="post-metadata">

### Author: ![henry2004y](https://discourse.paraview.org/user_avatar/discourse.paraview.org/henry2004y/32/2296_2.png) [@henry2004y](https://discourse.paraview.org/u/henry2004y)
#### Post date: [February 8, 2021, 10:23am UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410/3 "2021-02-08T10:23:19Z")

</div>

Thanks for the tips! I’ll try that.

Btw, how difficult would it be to convert it into a Python reader script using `VTKPythonAlgorithmBase`? If that can work without the need to recompile ParaView, I would definitely give it a try.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [February 8, 2021, 10:50am UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410/4 "2021-02-08T10:50:32Z")

</div>

Not sure it is possible without building ParaView and the VisitBridge. But maybe @ben.boeckel has a more valuable input ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [February 8, 2021, 5:09pm UTC](https://discourse.paraview.org/t/porting-an-existing-visit-plugin/6410/5 "2021-02-08T17:09:16Z")

</div>

We really only compile the bits of VisIt we need, so if you need some additional VisIt functionality, you’re going to have to touch ParaView’s code. I also don’t think the `xml2cmake` is valid for ParaView’s consumption of VisIt anymore (the API is very different now).

> [@nicolas.vuaille](#):
>
> VisIt plugins as shown in the Examples dir are not anymore supported. Some work is in progress to re-enable them (maybe for PV 5.10 ?)

Yes, I hope to get to reviewing that work before 5.10…
