Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

I think that if the key press event is defined in the vtk interactor, then it cannot be cleared through these functions. In other words, clear_events_for_key only clears events that are defined explicitly through PyVista. This isn't explained well in the documentation. Clearing the default vtk interactor events are unfortunately more involved than it should be. A work around is to add your own event observer at a higher priority and clear the key code before the vtk default events fire. I got this idea from https://discourse.vtk.org/t/consume-a-vtk-event-in-python/13052/3

See this example, which is a starting point, without the qt portion. I had to go to the vtk methods to avoid the weird…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@yscoffee
Comment options

@MatthewFlamm
Comment options

@MatthewFlamm
Comment options

Answer selected by yscoffee
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MatthewFlamm
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants