I’ve been developing plugins for ParaView using the new VTKPythonAlgorithmBase
interface. Is it possible to indicate the version in the Python file? Currently the version is always (unknown)
AFAIK, no there isn’t. Some wires need to be linked up in the plugin loading logic (which needs an issue I think). XML plugins probably also deserve a version field.
Thanks for your reply!
I’ve filed an issue here to track it: https://gitlab.kitware.com/paraview/paraview/issues/19492
1 Like
I found this piece of code inside pythonalgorithm.py
def get_plugin_version(module_or_package):
"""helper function called by vtkPVPythonAlgorithmPlugin to discover
ParaView plugin version, if any."""
from inspect import ismodule, isclass
if ismodule(module_or_package) and hasattr(module_or_package, "paraview_plugin_version"):
return str(getattr(module_or_package, "paraview_plugin_version"))
else:
return "(unknown)"
See also https://github.com/OpenGeoVis/PVGeo/blob/master/PVPlugins/PVGeo_Filters.py. So we just need to define a paraview_plugin_version
variable inside the Python file!
Works perfectly now!