Conversation
behackl
added this pull request to stack #5003
September 9, 2026 10:17
behackl
force-pushed
the
refactor/manager-targeted-frame
branch
from
September 10, 2026 08:24
0fc4f75 to
4dd018e
Compare
behackl
force-pushed
the
refactor/manager-targeted-frame
branch
from
September 10, 2026 09:51
4dd018e to
9efbbe0
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.
Overview: What does this pull request change?
Stacked on #5006.
Adds
Manager.capture_frame_at(timestamp)to execute a fresh scene up to a requested frame and return its image and timing information. Both Cairo and OpenGL use the same Manager implementation.The new
RenderedFrameresult contains an independent PIL image, the requested time, the selected frame's start time, and its zero-based index. Requests at or beyond the end of the frame sequence returnNone.Motivation and Explanation: Why and how do your changes improve the library?
Preview tools often need the image displayed at a particular animation time. This provides a public operation that runs the scene's Python code and normal animation steps, draws the preceding frames, and captures the selected frame.
Manager coordinates execution through the existing renderer drawing and pixel-readback methods. A shared delivery helper sends frames to the writer during ordinary rendering or captures the requested image. Frozen waits use their repeated frame intervals, and stop-condition waits contribute the frames actually reached.
At the selected frame, playback stops with the current animation at its captured state. Python
finallyblocks run, followed bytear_down()for cleanup. The returned image retains its pixels after cleanup and renderer closure. Successful capture respects an enclosingwith manager:resource scope; scene errors propagate after cleanup is attempted.Each request uses a fresh scene configured with
live_preview=False. For an image of an existing scene's current state,get_image()remains the appropriate operation. The method documentation cross-references these two uses.Links to added or changed documentation pages
Manager.capture_frame_at,Manager.get_image, and the newRenderedFramereference documentation, including an executable usage example.