XML Plugin Help

I have a python script I run in Paraview that opens a few files and applies a series of filters and takes some screen shots along the way. The script has a section for user variables too. Is it possible to create an XML only plugin in this case? My goal is to make it much easier for a user so they do not need to edit any of the python code and load it in. Ideally they would load some data files on their own, then apply this special filter which would prompt them to select the files they want to use and provide some parameters for the plugin itself.

I would prefer to make such a plugin without having to compile it because the users I’m supporting could be using any number of paraview versions and operating systems.

The closest thing I can think of is a ParaView macro. A macro is a Python script that can contain any of the Python commands available in the Python console. See the Macros menu for adding and managing macros.

Two things that aren’t possible, however, are providing a place to input parameters and choosing files in the UI. For those items, you could create a reader plugin (for file selection) and a Custom filter to chain together the series of filters and expose certain parameters, but this couldn’t include taking screenshots along the way. You could take screen shots in a macro, though.

Thanks for the feedback. Is there any reason why a macro couldn’t open a window for the user to enter in inputs? As for choosing input files, my intention was for the user to select them from the pipeline (i.e., files were already opened).

Macros are scripts that can be run in the ParaView desktop application that you are using, but they can also be run in pvpython, which assumes no UI is available. Hence ParaView does not provide a Python function to pop up a file choose from a Python script. Maybe you can find a way in Python to present a file chooser - I tried briefly with tkInter.filedialog available on my Mac, but it caused ParaView to crash.

You can get one selected source from the pipeline with paraview.simple.GetActiveSource(). It is not currently possible to get more than one selected source in the pipeline.