<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Perfect!!!!<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Gerrick<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> David Cole
[mailto:david.cole@kitware.com] <br>
<b>Sent:</b> Tuesday, December 02, 2008 10:15 AM<br>
<b>To:</b> Gerrick Bivins<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] vtkPlaybackWidget doesn't &quot;play&quot;<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>You need to call vtkRenderWindow::Render after each change
to force a render before the animation continues... Otherwise, there will just
be a pending paint message waiting to be processed when your animation is over
and you are again allowing the message loop to process paint messages.<o:p></o:p></p>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>Call vtkRenderWindow::Render, not vtkRenderer::Render...<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>HTH,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>David<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal>On Tue, Dec 2, 2008 at 11:10 AM, Gerrick Bivins &lt;<a
href="mailto:gbivins@objectreservoir.com">gbivins@objectreservoir.com</a>&gt;
wrote:<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>Hi David,</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I've tried calling Render via
vtkPlaybackRepresenation::GetRenderer()-&gt;Render() but that had no effect.</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I've subclassed
vtkPlaybackRepresentation and overridden Play as follows:</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&nbsp;&nbsp;&nbsp;&nbsp; virtual</span><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'>void</span> Play()</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;
&nbsp;&nbsp;&nbsp;{</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; _playing = <span style='color:blue'>true</span>;</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:green'>//this-&gt;_playThread.join();</span></span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:blue'>this</span>-&gt;PlayThread();</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; </span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;
&nbsp;&nbsp;&nbsp;}</span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>With PlayThread() as follows
(which I'd like eventually move functionality into a thread so I can pause it):</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void</span><span style='font-size:
10.0pt;font-family:"Courier New"'> PlayThread()</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:blue'>while</span>(_currentFrame &lt; NumberOfFrames
&amp;&amp; _playing)</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; {</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:green'>//this-&gt;_pbw-&gt;InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL);</span></span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; std::cout&lt;&lt;_currentFrame&lt;&lt;std::endl;</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:blue'>this</span>-&gt;UpdateCurrentFrame(1);</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; <span style='color:blue'>this</span>-&gt;GetRenderer()-&gt;Render();</span><o:p></o:p></p>

<p style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; }</span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>UpdateCurrentFrame calculates
the next frame depending on direction and triggers the pipeline update.</span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:10.0pt;font-family:"Courier New"'>Gerrick</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> David Cole [mailto:<a href="mailto:david.cole@kitware.com"
target="_blank">david.cole@kitware.com</a>] <br>
<b>Sent:</b> Tuesday, December 02, 2008 9:48 AM<br>
<b>To:</b> Gerrick Bivins<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] vtkPlaybackWidget doesn't &quot;play&quot;</span><o:p></o:p></p>

</div>

<div>

<div>

<p>&nbsp;<o:p></o:p></p>

<p>Are you calling Render from your play callback after each step of the animation...?<o:p></o:p></p>

<div>

<p style='margin-bottom:12.0pt'>&nbsp;<o:p></o:p></p>

<div>

<p>On Tue, Dec 2, 2008 at 10:33 AM, Gerrick Bivins &lt;<a
href="mailto:gbivins@objectreservoir.com" target="_blank">gbivins@objectreservoir.com</a>&gt;
wrote:<o:p></o:p></p>

<p><br>
Hello,<br>
I'm trying to use the vtkPlaybackWidget to control an animation sequence.<br>
All the actions work as expected except for the &quot;play&quot; button.
&nbsp;I've<br>
overridden the Play callback function to loop over my animation and update<br>
for each step but the render window is only updated at the end of sequence.<br>
Using the &quot;Forward&quot; and &quot;Backward&quot; step buttons work as
expected. Does<br>
anyone have any suggestions on how to get the render to update using the<br>
&quot;Play&quot; button?<br>
Thanks in advance,<br>
Gerrick<br>
--<br>
View this message in context: <a
href="http://www.nabble.com/vtkPlaybackWidget-doesn%27t-%22play%22-tp20794191p20794191.html"
target="_blank">http://www.nabble.com/vtkPlaybackWidget-doesn%27t-%22play%22-tp20794191p20794191.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>

</div>

<p>&nbsp;<o:p></o:p></p>

</div>

</div>

</div>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>