I’d like to create a Python filter that transforms point coordinates of the input dataset using arrays from a secondary dataset. The secondary dataset is virtually always the same, and I’d like my plugin to have a default, so that users don’t need to configure array selection every time.
Something like: “If dataset xxx.vtk is loaded at filter creation time, use arrays yyy and zzz from that dataset”. Can this be done in ParaView?
You can do something similar using a python filter/reader plugin, but what you are actually looking for may actually be a simple pvpython maccro that will look for the dataset and react accordingly.
Right. What I’m struggling with is “What functions do I need to use to accomplish this?” I spent some time trying to figure out how to enumerate the currently loaded datasets and how to change my filter’s input port bindings via a script, but got lost in ParaView APIs Are there any examples/tutorials out there? (other than PythonAlgorithmExamples.py)
Here is the documentation: