Reload Python Algorithms through Python Shell
When loading a state containing a module of python algorithms, it is possible to reload the module using the "Reload Python Module" command button in the property panel:
If one wishes to repeat the operation in python using the Python Shell, the following commands would replicate the above (to the best of my knowledge):
python_algorithm = FindSource("PythonAlgorithmExample1")
python_algorithm.SMProxy.RecreateVTKObjects()
but weirdly enough, the following error is raised:
Warning: In vtkSIPythonSourceProxy.cxx, line 421
vtkSIPythonSourceProxy (000002428C49E620): Failed to re-import module 'PythonAlgorithmExample'.
Additional Details
Python Algorithm used in this issue: PythonAlgorithmExample.py
To reproduce, load the given plugin above and apply it to a sphere. To instantiate the filter, simply search for "Python Algorithm Example"