I created a simple Slice Plugin in Python that inherits from
mySlicePlugin.py (1.8 KB))
This plugin uses “slice_implicit_functions” to set the implicit functions for cutting, but when I change the settings (e.g., change the origin of the cutting plane) and click the
Apply button, the output shape does not change. Is there any way to make the output result reflect the changed settings?
The operating environment is ParaView 5.11.1 on Windows.
Any advice would be appreciated.
This may be caused by the fact that your are changing properties of a proxy property, not of the proxy itself and maybe this is not correctly supported by python plugins.
You can try adding a dummy property with another setter (just a boolean) and try changing it and pressing apply to check that,
Thank you for your reply. I will look into it.
Had a similar problem for a C++ Plugin and tried to find out how the default clip and slice filters are doing this. I found the solution here: https://gitlab.kitware.com/paraview/paraview/-/blob/v5.11.1/VTKExtensions/FiltersGeneral/vtkPVDataSetAlgorithmSelectorFilter.cxx#L257-277
The GetMTime() function of the filter had to be overwritten to return maximum MTime of itself and MTime of the implicit function.
If it is possible to overwrite GetMTime from Python that may also work.
Thank you for the very useful information! Unfortunately, I have looked for a Python implementation, but so far have not been able to find one.