I have a couple of questions on interfacing with renderviews through the Python interface. I have a pvbatch script that I use to generate animation frames, and typically I’ve just had a single renderview in the statefile that I load. But presently I have a statefile with a layout containing two renderviews, and naturally, the “WriteAnimation()” command outputs a PNG file with both views shown.
In this case, I’d like to be able to write the animation with only a particular renderview in view.
So ideally, I wonder if there’s a way to either display a view, or to choose a particular view to write, while ignoring the other views.
Failing that, I can delete the undesired view(s), since after all once the batch process is over, I’m not saving the state back to the file. But if possible I’d like to be able do deactivate and reactive views – in case in a future project I want to render one view and then another as separate animations.
So that was question 1. Question 2 is: to enable me to select the view(s) to be deleted, I’d like to check the name of the view and keep only the view with the expected name (e.g. “AnimView”). So I know how to set the name of a view (both in GUI and in Python – RenameView(‘AnimView’, mainView)). But for the life of me, I can’t figure out how to check the name of the views returned by:
And I’ve Googled and Googled and Googled some more, looking through the code of “simple.py” (https://kitware.github.io/paraview-docs/latest/python/_modules/paraview/simple.html), and no luck. So I’m hoping someone here might know the answer off the top of their head (or near their fingers).
Thanks in advance,