Skip to content

RFC: Introduce a Manager for render-flow coordination - #4916

Draft
behackl wants to merge 5 commits into
mainfrom
feat/manager-port
Draft

RFC: Introduce a Manager for render-flow coordination#4916
behackl wants to merge 5 commits into
mainfrom
feat/manager-port

Conversation

@behackl

@behackl behackl commented Aug 6, 2026

Copy link
Copy Markdown
Member

Overview: What does this pull request change?

This RFC introduces a Manager attached to each Scene as a new coordination boundary for Manim's render flow. The idea is ported “in spirit” from the experimental branch, 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:

  • frame encoding and output lifecycle;
  • subtitle timeline management;
  • audio timeline management.

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.

@behackl behackl added breaking changes This PR introduces breaking changes refactor Refactor or redesign of existing code labels Aug 6, 2026
Comment thread manim/manager.py Dismissed
Comment thread manim/manager.py Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes This PR introduces breaking changes refactor Refactor or redesign of existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants