[Paraview] [EXTERNAL] Re: Create animation and center geometry
kenichiro yoshimi
rccm.kyoshimi at gmail.com
Tue Sep 27 19:43:02 EDT 2016
Hi, Ryan
You can specify the size of the images by assigning the render view
properties: view size.
---------
renderView1 = GetActiveViewOrCreate('RenderView')
renderView1.ViewSize = [600, 557]
renderView1.ResetCamera()
---------
Thanks,
Yoshimi
2016-09-27 23:10 GMT+09:00 Jamison, Ryan Dale <rdjamis at sandia.gov>:
> Yoshimi,
>
> Thanks for the script! This does exactly what I was wanting to do.
>
> One further question, where in the script can I define the size of the images to save?
>
> Best, Ryan
>
>> On Sep 26, 2016, at 10:40 PM, kenichiro yoshimi <rccm.kyoshimi at gmail.com> wrote:
>>
>> Hi, Ryan
>>
>> You try the script as follows from [Tools]-[Python Shell] after
>> reading datasets into ParaView.
>>
>> ---------save_screenshots.py---------
>> from paraview.simple import *
>>
>> # Change 10 to the amount of timesteps
>> for num in range(0,10):
>> print 'Save screenshot ' + str(num)
>>
>> renderView1 = GetActiveViewOrCreate('RenderView')
>> renderView1.ResetCamera()
>>
>> # Save screenshot
>> # Change to your folder
>> name = 'G:/ParaViewData-v4.1/Data/singleSphereAnimation/singleSphere'
>> + str(num).zfill(4) + '.png'
>> print 'Save as ' + str(name)
>> SaveScreenshot(name, magnification=1, quality=100, view=renderView1)
>>
>> animationScene1 = GetAnimationScene()
>>
>> animationScene1.GoToNext()
>> ---------
>>
>> Thanks,
>> yoshimi
>
More information about the ParaView
mailing list