-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom widget interaction events #2882
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2882 +/- ##
==========================================
- Coverage 94.11% 94.06% -0.05%
==========================================
Files 76 76
Lines 16506 16506
==========================================
- Hits 15535 15527 -8
- Misses 971 979 +8 |
Would be great if we can add this example here as well (probably a gallery example). |
The example given above is pulled straight from the example gallery. Only difference is using the new param: p.add_sphere_widget(..., interaction_event=vtk.vtkCommand.InteractionEvent) Should we update a few of those examples in the gallery to use this param? Would need to update the screen captures as well |
Maybe just one if it's not too much work. |
I added a demo of the custom interaction event to the slicing example -- that was the simplest and the concept/result is the same for all examples |
Co-authored-by: Bane Sullivan <banesulli@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
In the docstrings, I annotated the type as >>> type(vtk.vtkCommand.EndInteractionEvent)
<class 'vtkCommonCorePython.vtkCommand.EventIds'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM.
@akaszynski and @tkoyama010, Will this automatically merge in 24 hours if no further action is taken? |
I wish. We could probably create a GitHub action cron job that merges approved PRs after they've been open for 24H, but for now I've been doing it manually at the 24H+ mark. |
Good enough for me - no rush here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review removed due to merge with main, but merge was trivial.
Going to bypass 24H rule.
Overview
Resolves #2455 by enabling users to specify custom interaction events for triggering the callbacks associated with widgets
cc @tomazbregar, please review if you have the opportunity
Example
Using
vtk.vtkCommand.InteractionEvent