[Paraview] Python GetRenderViews after Load State

M P martin34148 at gmail.com
Wed Apr 30 05:34:46 EDT 2014


Hello,
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".

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

count = len(GetRenderViews())

print(count)
for viewIdx in range(count):
   actView = GetRenderViews()[viewIdx]
   print(actView)
   WriteImage('img'+str(viewIdx)+'.png', view=actView)
   print('img {} done'.format(viewIdx))

print('END')

Render()

It works perfectly when I create the the Layouts "manually" (from scratch,
without loading the the state file of the session).
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).

Probably a bug?

Thank you,

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140430/8f4c58e8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testLayout.pvsm
Type: application/octet-stream
Size: 335247 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140430/8f4c58e8/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saveImages.py
Type: application/octet-stream
Size: 364 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140430/8f4c58e8/attachment-0003.obj>


More information about the ParaView mailing list