<div dir="ltr"><div>Hello,<br></div><div>I am trying to create a script that will make a screenshot images from all Layouts in Paraview. This is my python script that I run through "Tools/Python Shell/Run Script".</div>
<div><br></div><div>try: paraview.simple<br>except: from paraview.simple import *<br>paraview.simple._DisableFirstRenderCameraReset()<br><br>count = len(GetRenderViews())<br><br>print(count)<br>for viewIdx in range(count):<br>
  actView = GetRenderViews()[viewIdx]<br>  print(actView)<br>  WriteImage('img'+str(viewIdx)+'.png', view=actView)<br>  print('img {} done'.format(viewIdx))<br> <br>print('END')<br><br>
Render()</div><div><br></div><div>It works perfectly when I create the the Layouts "manually" (from scratch, without loading the the state file of the session).</div><div>I save State File of this session, restart Paraview and load the State file. Now when I run the script the length of GetRenderViews() is incorrectly reported by Paraview. Paraview has 4 values in the GetRenderViews() list instead of 3 (correct value).</div>
<div><br></div><div>Probably a bug?</div><div><br></div><div>Thank you,</div><div><br></div><div>Martin</div></div>