Handling multiple views

Hi everyone,

Starting from a cfd case, I am trying to display different visualization criteria (Q-Criterion, Lambda2,…) on a particular slice of the domain. which is the same for all views. In order to do that simultaneously I divided the main layout in 4 render views. Now I would want to run a for loop to move the slice forward in space and update all the views for the new slice…

When you modify the position of the slice on Paraview then it works as expected, as when the origin of the slice changes, all views are updated and recalculated. When using pvpython instead, I can’t get more than one view to update, even if I record a trace and plug it directly in my python script.
They are only updating if I click individually on each one of them, which is a bit uncomfortable if you need to run large loops

Is this normal?
What is the correct handling of multple views in pvpython?

Thank you and have a great day

This doesn’t answer your question, but you might consider using ParaView’s animation controls to move the slice position. That might be easier than trying to control it through a Python script. See the ParaView guide: 7. Animation — ParaView Documentation 5.10.0 documentation.

To more directly answer your question, I suspect in the Python script you need to call Render for each of the views. Try something like this:

for view in GetViews():
  Render(view)
1 Like

The code you supplied solved the issue for me! Thank you