[Paraview] Create animation and center geometry
kenichiro yoshimi
rccm.kyoshimi at gmail.com
Tue Sep 27 00:40:47 EDT 2016
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
2016-09-27 12:21 GMT+09:00 Jamison, Ryan Dale <rdjamis at sandia.gov>:
> Hello Everyone,
>
> I'm trying to save an animation of a finite element model that has large
> deformation. The center of the deformed geometry changes quite a lot during
> the simulation.
>
> When I save the animation, I'm actually saving it as png's and combining
> them afterwards in another tool. I can figure out a center for the model to
> use that will center on the final geometry but it doesn't look good at the
> beginning.
>
> How can I change the center of the geometry as time progresses and then save
> the animations as png's?
>
> Thanks, Ryan
>
>
>
> Sent with Good (www.good.com)
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
More information about the ParaView
mailing list