Skip to content

feat(python): expose annotation read/write API on Bookmark#264

Merged
tedwaine merged 1 commit into
AcademySoftwareFoundation:developfrom
richardssam:py_annotations_v2
May 29, 2026
Merged

feat(python): expose annotation read/write API on Bookmark#264
tedwaine merged 1 commit into
AcademySoftwareFoundation:developfrom
richardssam:py_annotations_v2

Conversation

@richardssam
Copy link
Copy Markdown
Contributor

Register get_annotation_atom, annotation_data_atom and build_annotation_atom in py_atoms.cpp. Add three accessors to Bookmark: has_annotation (bool property), annotation_data (read-only serialise-based property returning the canvas dict), and set_annotation() which constructs a JsonStore payload and sends it via add_annotation_atom. Bypasses the AnnotationsCore undo stack intentionally, which is correct for sync/remote-write use cases.

(cherry picked from commit 964d1e294374b0bed9df8881b3a205b16513100b)

Linked issues

Summarize your change.

Describe the reason for the change.

Describe what you have tested and on which operating system.

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

Register get_annotation_atom, annotation_data_atom and
build_annotation_atom in py_atoms.cpp. Add three accessors to
Bookmark: has_annotation (bool property), annotation_data (read-only
serialise-based property returning the canvas dict), and
set_annotation() which constructs a JsonStore payload and sends it
via add_annotation_atom. Bypasses the AnnotationsCore undo stack
intentionally, which is correct for sync/remote-write use cases.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>
(cherry picked from commit 964d1e294374b0bed9df8881b3a205b16513100b)
@tedwaine tedwaine merged commit 82daad4 into AcademySoftwareFoundation:develop May 29, 2026
2 of 3 checks passed
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