Skip to content
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

Annotation Improvements #6256

Merged
merged 7 commits into from
Feb 10, 2025

Conversation

ericmehl
Copy link
Collaborator

@ericmehl ericmehl commented Feb 4, 2025

This adds a few enhancements to node annotations :

  • Copy annotation from a new right click context menu
  • Paste annotation onto the selected nodes using Control + V
  • Double click annotation to pop up the annotation editor for it
  • Intrepid users can customize the right click menu by connecting to AnnotationsUI.contextMenuSignal() or get individual annotations from the graph editor-wide annotations gadget using AnnotationsGadget::annotationAt().

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eric. I like the overall approach with annotationAt() doing the heavy lifting in C++ and then everything else being done on top in Python. And it feels great to be interacting more directly with the annotations in the UI now. Specific comments inline as usual...

@ericmehl ericmehl force-pushed the annotationImprovements branch from 47c552a to 1d8a888 Compare February 7, 2025 21:19
@ericmehl
Copy link
Collaborator Author

ericmehl commented Feb 7, 2025

I have the comments addressed and noted above. There's a couple of additional commits as well :

  • bfb53e0 : Inherits the color from a templated annotation for later pasting.
  • 1d8a888 : Fixes an issue where double clicking / right clicking on the bookmark annotation may allow you to copy a text annotation in error. The diff on Github is weird, all that's actually happening is putting the bookmark and numbered bookmark drawing inside a conditional that checks to see if selectionIds is given (and not drawing if they are).

Ready for a new look!

@johnhaddon
Copy link
Member

Thanks Eric, LGTM! Could you squash down ready for merging please?

@ericmehl ericmehl force-pushed the annotationImprovements branch from 1d8a888 to 3f8e83b Compare February 10, 2025 15:28
@ericmehl
Copy link
Collaborator Author

Squashed and merging!

@ericmehl ericmehl force-pushed the annotationImprovements branch from 3f8e83b to 15bc013 Compare February 10, 2025 16:13
@ericmehl ericmehl merged commit 3d2961b into GafferHQ:1.5_maintenance Feb 10, 2025
5 checks passed
@ericmehl ericmehl deleted the annotationImprovements branch February 10, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants