Timeline start/end markers

Right-clicking the numbered row offers Add Start/End Marker Here and
Remove Markers; Shift+Comma / Shift+Period (configurable) set them at the
playhead. Markers are faded playheads, with the numbers outside their
range darkened, and playback loops within them. They are saved as
StartMarker/EndMarker on the editor's copy (SourceDocument) only, as one
undoable edit each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-03 21:03:00 -04:00
1 parent 24af98a68e
commit 251d04848a
15 files changed
+147 -13

No files matched your search

+9
View File
@@ -368,6 +368,15 @@ namespace anm2ed::model
return length;
}
// The frames playback stays within: [start, end), from the markers (or the whole animation).
glm::ivec2 animation_play_range_get(const Animation& animation)
{
auto length = std::max(animation.frameNum, 1);
auto start = animation.startMarker != -1 ? std::clamp(animation.startMarker, 0, length - 1) : 0;
auto end = animation.endMarker != -1 ? std::clamp(animation.endMarker + 1, start + 1, length) : length;
return {start, end};
}
int animation_length_get(const Animation& animation)
{
int length{};