Joachim, I have also sent my question to the vtkusers mailing list after you have suggested it. Unfortunately more than half of the questions sent to vtkusers are never answered, although my impression is that they are formulated better than most questions on the paraview list in general.
So, I'll appreciate if somebody has an idea how to continue receiving TimerEvents from a vtkRenderWindowInteractor while a mouse button is pressed. By the way, I observed this problem with the Paraview version of VTK (Paraview 5.4.1). Kolja <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virenfrei. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Mon, Nov 13, 2017 at 5:02 AM, Joachim Pouderoux < joachim.pouder...@kitware.com> wrote: > Kolja, > > As it is a VTK Python related question, please address this issue to the > VTK mailing list instead. > > Best, > > *Joachim Pouderoux*, PhD > > *Technical Expert - Scientific Computing Team* > *Kitware SAS <http://www.kitware.fr>* > > > 2017-11-12 17:15 GMT+01:00 Kolja Petersen <petersenko...@gmail.com>: > >> Heya, >> 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. >> 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. >> >> Why are no TimerEvents fired when a button is pressed, and how can I >> change this behaviour? >> Thank you >> Kolja >> >> import vtk >> >> class Observer(object): >> def __init__(self): >> self.cnt=0 >> def __call__(self,caller,evt): >> self.cnt+=1 >> print "count %d %s" % (self.cnt,evt) >> >> ren1 = vtk.vtkRenderer() >> ren1.SetBackground(0.1, 0.2, 0.4) >> >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren1) >> renWin.SetSize(300, 300) >> >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> style = vtk.vtkInteractorStyleTrackballCamera() >> iren.SetInteractorStyle(style) >> >> iren.Initialize() >> observer=Observer() >> iren.AddObserver(vtk.vtkCommand.TimerEvent,observer) >> iren.AddObserver(vtk.vtkCommand.MouseMoveEvent,observer) >> iren.AddObserver(vtk.vtkCommand.InteractionEvent,observer) >> iren.CreateRepeatingTimer(100) >> iren.Start() >> >> >> >> >> _______________________________________________ >> 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 >> >> >
_______________________________________________ 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