<div dir="ltr"><div><div><div><div>Thank you, Utkarsh! It tried CameraAnimationCue, but it still segfaulted with the error "No camera to animate". Therefore, I added <br><br></div>Show(reader)<br></div>Render()<br>
<br></div>before creating a cue. Now it works. However, the resulting movie is just one black frame lasting for a fraction of a second. How can I tell the script to add the object itself to the movie and to do it for every frame? I have over 100 frames in .vtk files.<br>
<br>--<br></div>Morten<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 6:02 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Morten,<br>
<br>
(i) Use CameraAnimationCue instead of KeyFrameAnimationCue.<br>
(ii) Try using the WarpByVector() filter.<br>
<br>
Utkarsh<br>
<div><div class="h5"><br>
On Mon, Feb 4, 2013 at 6:54 AM, Morten Olsen <<a href="mailto:morten.olsen2079@gmail.com">morten.olsen2079@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I'm new to the batch interface and trying to batch animations using pvbatch.<br>
> I have read the wiki and searched through the mailing list for information,<br>
> and found many useful answers. However, I'm stuck with two questions:<br>
><br>
> i) The following script segfaults with the error message posted at the end<br>
> of this email. Any idea how to solve it?<br>
><br>
> #!/usr/local/bin/pvbatch<br>
><br>
> from paraview.simple import *<br>
><br>
> reader = PVDReader(FileName='vtkfiles/displacement.pvd')<br>
><br>
> scene = GetAnimationScene()<br>
> view = GetActiveView()<br>
><br>
> cue = servermanager.animation.KeyFrameAnimationCue()<br>
> cue.StartTime = 0.0<br>
> cue.EndTime = 1.0<br>
> cue.AnimatedProxy = view<br>
><br>
> keyf0 = servermanager.animation.CameraKeyFrame()<br>
> keyf0.KeyTime = 0.0<br>
> keyf1 = servermanager.animation.CameraKeyFrame()<br>
> keyf1.KeyTime = 1.0<br>
> cue.KeyFrames = [keyf0, keyf1]<br>
><br>
> movie = servermanager.animation.AnimationScene()<br>
> movie.ViewModules = [view]<br>
> movie.Cues.append(cue)<br>
><br>
> movieWriter = servermanager.vtkSMAnimationSceneImageWriter()<br>
> movieWriter.SetFrameRate(24)<br>
> movieWriter.SetFileName("movie.avi")<br>
> movieWriter.SetAnimationScene(movie.SMProxy)<br>
> movieWriter.Save()<br>
><br>
><br>
> ii) How can I add the warp by vector filter?<br>
><br>
> By the way, I'm using the standard 3.14.1 64-bit edition of Paraview on<br>
> Linux Mint Maya.<br>
><br>
> Here's the segfault output:<br>
><br>
> ERROR: In<br>
> /build/buildd/paraview-3.14.1/ParaViewCore/ClientServerCore/vtkPVCameraKeyFrame.cxx,<br>
> line 81<br>
> vtkPVCameraKeyFrame (0x2938dc0): This keyframe can only be added to<br>
> vtkPVCameraCueManipulator.<br>
><br>
> [maya:06239] *** Process received signal ***<br>
> [maya:06239] Signal: Segmentation fault (11)<br>
> [maya:06239] Signal code: Address not mapped (1)<br>
> [maya:06239] Failing at address: (nil)<br>
> [maya:06239] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f6d300de4a0]<br>
> [maya:06239] [ 1]<br>
> /usr/lib/paraview/libvtkPVServerManager.so(_ZN19vtkSMAnimationScene12TickInternalEddd+0x137)<br>
> [0x7f6d31b6baf7]<br>
> [maya:06239] [ 2]<br>
> /usr/lib/paraview/libvtkCommon.so.pv3.14(_ZN15vtkAnimationCue4TickEddd+0xa5)<br>
> [0x7f6d30a47175]<br>
> [maya:06239] [ 3]<br>
> /usr/lib/paraview/libvtkPVServerManager.so(_ZN25vtkSMAnimationSceneWriter4SaveEv+0x42)<br>
> [0x7f6d31b728d2]<br>
> [maya:06239] [ 4]<br>
> /usr/lib/paraview/libvtkPVServerManagerPythonD.so(+0x53775) [0x7f6d08427775]<br>
> [maya:06239] [ 5] /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x53a5)<br>
> [0x7f6d25e49845]<br>
> [maya:06239] [ 6] /usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x855)<br>
> [0x7f6d25e14605]<br>
> [maya:06239] [ 7] /usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x32)<br>
> [0x7f6d25e14932]<br>
> [maya:06239] [ 8] /usr/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0xb0)<br>
> [0x7f6d25e15740]<br>
> [maya:06239] [ 9] /usr/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xdf)<br>
> [0x7f6d25e15b8f]<br>
> [maya:06239] [10] /usr/lib/libpython2.7.so.1.0(Py_Main+0xbdc)<br>
> [0x7f6d25e179cc]<br>
> [maya:06239] [11]<br>
> /usr/lib/paraview/pvbatch(_ZN14ParaViewPython3RunEiiPPc+0x119) [0x4017e9]<br>
> [maya:06239] [12] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)<br>
> [0x7f6d300c976d]<br>
> [maya:06239] [13] /usr/lib/paraview/pvbatch() [0x401471]<br>
> [maya:06239] *** End of error message ***<br>
> Segmentation fault (core dumped)<br>
><br>
> Thanks for all help, really appreciated!<br>
><br>
> --<br>
> Morten<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br></div>