[vtkusers] About MouseEvents.py example
elvis.stansvik at orexplore.com
Thu Jun 16 09:52:02 EDT 2016
The MouseEvents.py example  currently does:
print("Middle Button pressed")
print("Middle Button released")
But I don't understand the reason for calling e.g.
self.OnMiddleButtonDown() ? Since this is not an override of a virtual
function (which is not possible in Python), but simply adding another
observer, I don't think it is needed? (..and I would think it would mean
OnMiddleButtonDown is called twice, right?).
This leads me to another question: What if I really do want to override the
behavior that the parent interactor style provides (or modify it by
manipulating the event), what are my options?
I saw at
that you can remove all observers of an event from the interactor, but that
seems like quite a hack :/ In my case, I'm interested in locking the camera
rotation to a certain axis, but perhaps a custom interactor style is not
the way to go?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers