RFC: Introduce a Manager for render-flow coordination - #4916
Draft
behackl wants to merge 5 commits into
Draft
Conversation
# Conflicts: # manim/scene/scene.py
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?
This RFC introduces a
Managerattached to eachSceneas a new coordination boundary for Manim's render flow. The idea is ported “in spirit” from theexperimentalbranch, but adapted to work incrementally with main’s existing Cairo and OpenGL backends.The manager currently coordinates scene lifecycle, play timing, sections, subtitles, and audio, while forwarding to the existing renderer and file writer. Existing backend behavior and construction remain unchanged.
Motivation and Explanation: Why and how do your changes improve the library?
Rendering responsibilities are currently spread across
Scene, renderer, camera, and file writer, with unclear ownership and substantial cross-calling.The long-term goal is to disentangle this flow and establish clean ownership relationships between the individual processes. This PR is intentionally an incremental prototype: it introduces a central coordination seam without attempting to redesign either rendering backend immediately.
Feedback is particularly welcome on the manager boundary, lifecycle, and migration direction.
Likely follow-up
Design and implement a backend-neutral output/file-writer contract, with clear responsibility for:
This should also allow file-writer construction and ownership to move gradually from the renderers to the manager.
Links to added or changed documentation pages
No documentation changes; this PR is intended as an architectural RFC.