Skip to content

fix: SG-44988: Fix annotations drawn on empty canvas with new annotation package - #1422

Open
eloisebrosseau wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
eloisebrosseau:fix-empty-canvas-annotation
Open

eloisebrosseau wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
eloisebrosseau:fix-empty-canvas-annotation

Conversation

@eloisebrosseau

@eloisebrosseau eloisebrosseau commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

fix: SG-44988: Fix annotations drawn on empty canvas with new annotation package

Summarize your change.

The Mu annotation package uses a tag so that imagesAtPixel only returns RVPaint nodes associated with the active view instead of any image rendered at that pixel. This is useful to properly detect the source we are currently on when there a multiple images (e.g. stack or layout view), and also contributes to correctly detecting an empty canvas. This behaviour was missing from the new annotation package. _find_paint_node() was also mistakenly returning the first paint node from the list of RVPaint nodes if none were found from the view node info. It should have simply returned None instead of an arbitrary paint node. This caused strokes to be registered when clicking on empty Sequence view canvas because the Default Layout node was the first in that list.

Note that a typo in the bindings for committing text was also fixed from before-graph-view-changed to before-graph-view-change.

Describe the reason for the change.

With the new annotation package, strokes were registered on empty canvas or on the wrong node.

Describe what you have tested and on which operating system.

Drawing was tested on macOS for the following:

  • Empty canvas for Sequence, Stack, and Layout views
  • Movie clip loaded before and after opening the new annotation tool
  • On a movie clip after clearing the first one

Signed-off-by: Éloïse Brosseau <eloise.brosseau@autodesk.com>
self._current_source_name = name
paint_node, frame = self._find_paint_node()
if paint_node is None:
return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we event.reject() here like on line 886 or not ?

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.

3 participants