<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-06-17 15:51 GMT+02:00 Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Elvis,<br>
<br>
It would be great if you could create a merge request on gitlab! And<br>
once you do, don't be afraid to bug us to take a look.<br></blockquote><div><br></div><div>Thanks Cory, the merge request is here:<br><br>    <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/1577">https://gitlab.kitware.com/vtk/vtk/merge_requests/1577</a> <br><br></div><div>Have a nice weekend,<br></div><div>Elvis<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Contributing guidelines are here:<br>
<br>
<a href="https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md</a><br>
<br>
Cory<br>
<div><div class="h5"><br>
On Fri, Jun 17, 2016 at 2:44 PM, Elvis Stansvik<br>
<<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
> 2016-06-17 12:43 GMT+02:00 Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>>:<br>
>><br>
>> Hi all,<br>
>><br>
>> From what I've read, vtkInteractorStyleUser is still the canonical way to<br>
>> do completely custom interaction behavior from Python, by observing the<br>
>> events of the interactor.<br>
>><br>
>> But running this minimal test case:<br>
>><br>
>> from vtk import vtkRenderWindow<br>
>> from vtk import vtkRenderWindowInteractor<br>
>> from vtk import vtkInteractorStyleUser<br>
>> from vtk import vtkCommand<br>
>><br>
>> def onLeftButtonPressEvent(sender, event):<br>
>>     print('left button press')<br>
>><br>
>> def onMouseWheelForwardEvent(sender, event):<br>
>>     print('wheel forward')<br>
>><br>
>> interactorStyle = vtkInteractorStyleUser()<br>
>><br>
>> interactorStyle.AddObserver(<br>
>>     vtkCommand.LeftButtonPressEvent,<br>
>>     onLeftButtonPressEvent)<br>
>><br>
>> interactorStyle.AddObserver(<br>
>>     vtkCommand.MouseWheelForwardEvent,<br>
>>     onMouseWheelForwardEvent)<br>
>><br>
>> renderWindow = vtkRenderWindow()<br>
>><br>
>> interactor = vtkRenderWindowInteractor()<br>
>> interactor.SetRenderWindow(renderWindow)<br>
>> interactor.SetInteractorStyle(interactorStyle)<br>
>> interactor.Start()<br>
>><br>
>> It seems that wheel events are not supported by vtkInteractorStyleUser?<br>
>> Scrolling the wheel forwards prints nothing, while pressing the left mouse<br>
>> button prints "left button press" as expected.<br>
><br>
><br>
> I'm starting to think that this is simply an accidental omission in<br>
> vtkInteractorStyleUser. Would you accept a patch to add support for<br>
> MouseWheelForwardEvent and MouseWheelBackwardEvent?<br>
><br>
> Elvis<br>
><br>
>><br>
>> What should I do if I want to provide completely custom interaction from<br>
>> Python, and still be able to handle wheel events?<br>
>><br>
>> Thanks in advance,<br>
>> Elvis<br>
>><br>
><br>
><br>
</div></div>> _______________________________________________<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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
><br>
<span class=""><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.<br>
</font></span></blockquote></div><br></div></div>