<p dir="ltr"><br>
Den 17 juni 2016 12:35 fm skrev "David Gobbi" <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>>:<br>
><br>
> On Thu, Jun 16, 2016 at 12:35 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Jun 16, 2016 at 11:08 AM, Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>>><br>
>>><br>
>>> Thanks for the pointer, that's good. Though I see now that the only supported types are strings, floats, ints and vtk.vtkObject. In my case I would have been interested in QMouseEvent, since I read that QVTKWidget will use that as callData on the C++ side and was hoping the could have been true in Python (but perhaps it wouldn't have been due to other reasons..?).<br>
>><br>
>><br>
>> You're the first person who has asked, but yes, it would be possible to modify the Python wrappers to pass a Qt object as the callData. Â  If you're willing to try, or if you know someone who'd be willing, I'd be glad to provide assistance.  The modifications would have to be done in vtkWrapPythonMethodDef.c.  The wrapper API provides a method called SIPGetPointerFromObject() in vtkPythonUtil.h that is specifically made for getting a "void *" for a Qt object.<br>
><br>
><br>
> Out of curiosity I looked into this a bit deeper, and it would be harder than I thought.  It cannot be done without re-enabling at least some of the VTK SIP wrapper functionality that has been bit-rotting for the past few years.  Of course, this is all very doable if someone is willing to do it.</p>
<p dir="ltr">Alright, thanks for having a look anyway. In my case I have to rely on a currently released version of VTK.</p>
<p dir="ltr">I'm sure that what I want to do (restrict camera rotation to a single axis) can be done in some other, probably better, way.</p>
<p dir="ltr">I'm curious about the limitations in the Python wrappers that overriding C++ virtuals won't work though. Is that something that would work if SIP wrappers were revived? Because I know that in PyQt it works. </p>
<p dir="ltr">Elvis</p>
<p dir="ltr">><br>
> Â - David</p>