Autoloading VTKPythonAlgorithmBase plugins with CMake

Hello there,

I have a couple plugins that I developed using the VTKPythonAlgorithmBase class.
I would like them to be built along with my main project so that they would be loaded automatically after a fresh install. So manually loading the .py files and clicking auto-load is not an option.
I cannot find any example of implementation and my attempts have failed.

Let’s consider the file that is included in paraview
( ParaView/Examples/Plugins/PythonAlgorithm/ )

I wrote both a CMakeLists.txt and a plugin.cmake for it, and so far, I am able to see that plugin in the plugin list. It is shown as being loaded, and the “Auto Load” line has the checkmark but I can’t instantiate the plugin in paraview.

I expect to be able to create a “Python-based Superquadric Source Example” like when I load the file manually but I can’t.

My CMakeLists.txt



My plugin.cmake


Any clues?
Thank you very much

1 Like