<div dir="ltr"><div><div>Kolja,<br><br></div>As it is a VTK Python related question, please address this issue to the VTK mailing list instead.<br><br></div>Best,<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>Joachim Pouderoux</b><font size="2">, <font size="1">PhD</font></font><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><i>Technical Expert - Scientific Computing Team</i></font><br><b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br></blockquote>
</div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-11-12 17:15 GMT+01:00 Kolja Petersen <span dir="ltr"><<a href="mailto:petersenkolja@gmail.com" target="_blank">petersenkolja@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Heya,<br>I paste some code below, which displays an empty vtkRenderWindow with an interactor. The interactor fires a TimerEvent every 100ms as printed by the Observer.<br>The problem: when I press a mouse button in the vtkRenderWindow, the TimerEvents stop to be reported, although I need to process data periodically in my application as a reaction to those TimerEvents.<br><br>Why are no TimerEvents fired when a button is pressed, and how can I change this behaviour?<br>Thank you<br>Kolja<br><br>import vtk<br><br>class Observer(object):<br>  def __init__(self):<br>    self.cnt=0<br>  def __call__(self,caller,evt):<br>    self.cnt+=1<br>    print "count %d %s" % (self.cnt,evt)<br><br>ren1 = vtk.vtkRenderer()<br>ren1.SetBackground(0.1, 0.2, 0.4)<br><br>renWin = vtk.vtkRenderWindow()<br>renWin.AddRenderer(ren1)<br>renWin.SetSize(300, 300)<br><br>iren = vtk.vtkRenderWindowInteractor(<wbr>)<br>iren.SetRenderWindow(renWin)<br><br>style = vtk.<wbr>vtkInteractorStyleTrackballCam<wbr>era()<br>iren.SetInteractorStyle(style)<br><br>iren.Initialize()<br>observer=Observer()<br>iren.AddObserver(vtk.<wbr>vtkCommand.TimerEvent,<wbr>observer)<br>iren.AddObserver(vtk.<wbr>vtkCommand.MouseMoveEvent,<wbr>observer)<br>iren.AddObserver(vtk.<wbr>vtkCommand.InteractionEvent,<wbr>observer)<br>iren.CreateRepeatingTimer(100)<br>iren.Start()<br><br><br><br></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>