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