Porting an existing VisIt plugin

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++. 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)? Do I need to build ParaView myself with 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. 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.

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.

1 Like

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.

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

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).

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