[prev in list] [next in list] [prev in thread] [next in thread]
List: paraview
Subject: [Paraview] Python GetRenderViews after Load State
From: M P <martin34148 () gmail ! com>
Date: 2014-04-30 9:34:46
Message-ID: CAKKV2WvjYgHgK0oiB+pqqeD16rHD0a-ykQOWSdJnLFDgm2GRSQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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
[Attachment #5 (text/html)]
<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>
--047d7bdc912e6516cd04f83f4243--
["testLayout.pvsm" (application/octet-stream)]
["saveImages.py" (application/octet-stream)]
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic