Add 'Manual' auto align mode with persistent per-source compare offsets - #315
Open
adam-ealovega wants to merge 1 commit into
Open
Conversation
|
|
Exposes the existing per-SubPlayhead frame offset engine (issue AcademySoftwareFoundation#93 / AcademySoftwareFoundation#166 territory) so compare offsets can be driven per source and survive selection and compare-mode changes: - New AAM_ALIGN_MANUAL auto align mode ('Manual'). In this mode align_clip_frame_numbers() applies user-set offsets instead of computing them from timecode or zeroing them. - Offsets are remembered against each media uuid, so they re-apply when the selection changes (e.g. comparing sub-pairs of a lineup). - New PlayheadActor message handlers (source_offset_frames_atom + media uuid or selection index + offset) to set an offset on ANY compared source, not just the hero sub-playhead. - 'Source Alignment Frames' attribute is now writable in Manual mode and live-updates in all modes to reflect the applied offsets. - Manual offsets restore correctly from serialised sessions. - Python API: Playhead.auto_align_mode, Playhead.source_alignment_frames, Playhead.set_source_offset_frames(media|uuid|index, offset). Positive offset plays the source earlier. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adam Ealovega <adam.ealovega@stargatestudios.net>
adam-ealovega
force-pushed
the
upstream-offsets-develop
branch
from
July 24, 2026 21:19
0fad669 to
ae3cacd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: compare sources get individual frame offsets that survive selection and compare-mode changes, via a new "Manual" auto align mode. Small diff, reuses the existing retime engine, no behavior change to any existing align mode, validated on production media on v1.3.0 and
developWindows builds.Implements the API/persistence layer described in #314 (and long wished for in #93 / #166): per-source frame offsets for compare modes, driven through the engine that already exists in the codebase.
What this adds
AAM_ALIGN_MANUAL("Manual") auto align mode. In this modealign_clip_frame_numbers()applies user-set offsets instead of computing them from timecode or zeroing them. Offsets are remembered per media uuid insidePlayheadActorand re-applied on every selection rebuild — so they survive selection changes, compare-mode changes, and bare-pair sub-selections of a larger lineup (the current behavior recomputes or zeroes offsets on every such change).PlayheadActorhandlers(media::source_offset_frames_atom, <media uuid | selection index>, offset)so ANY compared source can be offset, not just the hero sub-playhead (the existing "Source Offset Frames" attribute remains hero-only and untouched in behavior).Playhead.auto_align_mode,Playhead.source_alignment_frames,Playhead.set_source_offset_frames(media|uuid|index, offset).Sign convention follows the existing engine: positive offset plays the source earlier.
What this deliberately does not add
No UI — the #93 Compare Settings Bar can layer on top of this. The change is confined to the playhead module + one pybind enum value + the Python wrapper; no behavior change for any existing align mode ("Off", "On", "On (Trim)" are untouched paths).
Validation
Behaviorally validated on production review media (multi-source render/plate/reference lineups, EXR/JPEG sequences and QuickTimes) on Windows builds of both v1.3.0 and this
develop-based branch:position - delay, matching the engine's existing held-frame retime behavior);sub_playhead.cpp(the retimer) is untouched by this PR and identical between v1.3.0 anddevelop, so retime behavior is inherited, not re-implemented.We run this patch in production at our facility as the engine behind our review tooling's aligned-compare feature.
Portions of this change were developed with AI assistance (Anthropic's Claude); the approach, code, and behavior were reviewed and validated by the submitting engineer on production media.