Skip to content

[EXPERIMENTAL] Make play_logic and file_writer tests pass + Manager fixes#4559

Open
FBurna wants to merge 5 commits intoManimCommunity:experimentalfrom
FBurna:fix-actual-dt-in-embed
Open

[EXPERIMENTAL] Make play_logic and file_writer tests pass + Manager fixes#4559
FBurna wants to merge 5 commits intoManimCommunity:experimentalfrom
FBurna:fix-actual-dt-in-embed

Conversation

@FBurna
Copy link

@FBurna FBurna commented Feb 1, 2026

Overview: What does this pull request change?

Hi! I've been working on getting the tests in test_play_logic.py and test_file_writer.py to pass reliably on the experimental branch. To do this, I had to fix several bugs and architecture issues that were getting in the way.

Here is what I changed:

  • Arrow: Fixed a crash in initialization (float vs list type error) and restored the scaling logic.
  • Manager:
    • Made save_last_frame actually work (mapped it to the new _skipping logic).
    • Fixed frozen_frame so time advances correctly even when mobjects don't update.
    • Fixed dt calculation to be smoother using perf_counter.
  • OpenGL:
    • Swapped old texture2D for texture in shaders (modern OpenGL).
    • Fixed a transparency bug in the file_writer tests (removed a line causing full opacity).
  • Fixes:
    • Fixed a recursion error in VMobject colors.
    • Fixed PyAV compatibility (add_stream instead of legacy template).

Motivation and Explanation: Why and how do your changes improve the library?

Basically, I wanted to fix the test suite. The play_logic and file_writer tests were largely broken or skipped, so I went down the rabbit hole of fixing the Manager and Renderer until they passed.

Now test_file_writer.py passes completely, and test_play_logic.py is stable (I marked one caching thing as a TODO because it needs more work).

Links to added or changed documentation pages

Further Information and Comments

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

FBurna and others added 5 commits February 1, 2026 17:40
- Fix Arrow stroke_width initialization (float vs list bug) and restore scaling logic.
- Implement 'save_last_frame' logic by integrating it with skipping mechanism.
- Refactor Manager.post_construct to ensure correct exit and image saving behavior.
- Fix transparency issues in OpenGLRenderer (background_opacity and shader alpha).
- Update shader code to use modern 'texture()' syntax instead of 'texture2D()'.
- Fix VMobject recursion error in set_fill and ManimColor initialization.
- Restore audio connectivity in Scene.add_sound.
- Update tests to align with new Manager(Scene) architecture and document pending TODOs.
- Detailed rationale in CHANGES_SUMMARY.md.
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.

1 participant