[Paraview] [EXTERNAL] Re: Create animation and center geometry

Jamison, Ryan Dale rdjamis at sandia.gov
Tue Sep 27 10:10:02 EDT 2016


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