I'm trying to write a Python script for Paraview that will create a .png or .pdf screenshot file with multiple views in it. The emphasis here being the MULTIPLE VIEWS part. To be clear, I have three different windows in my Paraview display: one showing the model viewed in the XZ plane, one in the XY plane and one in the YZ plane. I'm trying to use a python script to create a single file showing all three of these views. This can be done manually by clicking File->Save Screenshot
and then unchecking the Save only selected view
button. I need to do this several hundred times, so clearly a script is the way to go.
I've tried using the "Start trace" option to see how this operation works, but the code it produces seems incomplete:
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
RenderView1 = GetRenderView()
RenderView2 = GetRenderViews()[1]
RenderView3 = GetRenderViews()[2]
WriteImage(r'E:\TestFolder\TestFile_00.png', view=RenderView1)
WriteImage(r'E:\TestFolder\TestFile_01.png', view=RenderView2)
WriteImage(r'E:\TestFolder\TestFile_02.png', view=RenderView3)
Render()
When I run something similar to this it just produces three separate .png files, one for each view. Maybe these are meant to be temporary files that Paraview combines to make the finished product, but I have no idea how to combine them.
Does anyone have any experience with this problem? I've scoured the internet and the Paraview documentation, but the only examples I can find have a single view only. Any help would be much appreciated.
I'm using Paraview 3.12.0 32-bit on Windows XP