Skip to content

Use the right first frame for view_step_manual - #524

Open
bbcuffer wants to merge 1 commit into
thomasp85:mainfrom
bbcuffer:i498
Open

bbcuffer wants to merge 1 commit into
thomasp85:mainfrom
bbcuffer:i498

Conversation

@bbcuffer

Copy link
Copy Markdown

Fixes #498.

calculating .frame as frame number modulo the-total-number-of-frames was counting the final frame as zero (and so sorted first) rather than the largest possible value.

The output now looks ok:

i498

And the md5sums match for frames 1 & 2 and for 99 & 100 but not 1 & 100.

md5s[c(1, 2, 99, 100)]
[1] "705cb0805d777a367dc6f672390f417b" "705cb0805d777a367dc6f672390f417b" "aaf80ac3c0a60360b6a35e056e836be8"
[4] "aaf80ac3c0a60360b6a35e056e836be8"

Modulo arithmetic moved the final frame
from last to first.

.frame was frame-number %% number-of-frames
(which is zero for the final frame - ie first
when sorted on .frame)
fix is to use
(frame-number - 1) %% number-of-frames

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

view_step_manual() inserts final frame at start of animation

1 participant