Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Latest commit

 

History

History
32 lines (21 loc) · 1.01 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.01 KB

Using Manim python API with threading (Minimal examples)

This is a showcase of how manim fails to render video output when used within renamed threads.

Threads can be manually renamed or automatically renamed by running ThreadPools in certain situations (such as spawning new process tasks within threads).

The tests expect the output file to stay the same as the configured file (ending in .mp4).

However when Manim detects the thread name is not equal to 'MainThread' it will put the play command into a queue, which causes manim to not render any animation.

See scene.py

if threading.current_thread().name != "MainThread":
    #...
    self.queue.put(("play", args, kwargs))
    return

Since the manim renderer has no configured animations (renderer.num_plays stays 0) it defaults to render the last frame as a PNG output.

Install

poetry install

Run tests

pytest