Plugin with multiple custom filters

I have two separate plugins that add filters to paraview. The plugins expose different existing filters. When I load both plugins into paraview, selecting either added filter loads the same interface in the pipeline under different names, with this being the first plugin that was loaded. Both plugins work successfully if loaded in different sessions. Is there a way around this?

I believe it was also mentioned that a plugin can add multiple filters to paraview, which may also solve the problem. Are there any examples for a plugin that contains multiple filters? I have not been able to find any.

You have some name collisions.

I believe it was also mentioned that a plugin can add multiple filters to paraview, which may also solve the problem. Are there any examples for a plugin that contains multiple filters? I have not been able to find any.

Of course, you can find one here: https://gitlab.kitware.com/paraview/paraview/-/tree/master/Plugins/ExplicitStructuredGrid

Please note, you can even use a single .xml file instead of multiple ones.

Thank you for the example - I was able to get my plugin to compile successfully implementing two filters. The plugin shared lib
rary successfully loads into paraview and the filters are available in the filter tree, however, when I select either filter paraview crashes.

I am building against the paraview superbuild v5.9.1 on windows, here is the plugin file pvOptGUI.zip (261.0 KB)

pvOptUMesh seems to work perfectly.

pvOptAirFoil does not work because the filter it uses, vtkCountCellVertices, does not exist in your plugin nor in VTK/ParaView

I tried changing the filter type for pvOptAirfoil a few times to filters that existed in the superbuild, each time making sure I was including the library that the filter came from:

vtkCountVertices - caused paraview to crash on loading the plugin
vtkMeshQuality - plugin loaded but selecting either filter selected the first built one again
vtkEvenlySpacedStreamlines2D - pvOptUMesh was loaded in filter tree and working but pvOptAirfoil was missing.

Not sure what you mean, in any case, the filter vtkCountCellVertices is absent from the plugin you shared, this can’t work.

Share your other versions if you need help.

Here is the example where the two filters are exposing the same vtk class vtkMeshQuality. Both pvOptAirfoil and pvOptUMesh load the pvOptAirfoil custom filter when selected. You mentioned something about name clashing? What could cause this?

pvOptGUI.zip (261.1 KB)

Your plugin is working perfectly here.

You mentioned something about name clashing? What could cause this?

Do not use the same name for proxies.

I was able to make it work, the issue was that both the property widgets I was creating in the cmakelists had the same name. Thank you for the help.

1 Like