DummySceneFileWriter

Qualified name: manim.utils.testing.\_test\_class\_makers.DummySceneFileWriter

class DummySceneFileWriter(renderer, scene_name, **kwargs)[source]

Bases: SceneFileWriter

Delegate of SceneFileWriter used to test the frames.

Methods

add_partial_movie_file

Adds a new partial movie file path to scene.partial_movie_files and current section from a hash.

begin_animation

Used internally by manim to stream the animation to FFMPEG for displaying or writing to a file.

clean_cache

Will clean the cache by removing the oldest partial_movie_files.

combine_to_movie

Used internally by Manim to combine the separate partial movie files that make up a Scene into a single video file for that Scene.

combine_to_section_videos

Concatenate partial movie files for each section.

end_animation

Internally used by Manim to stop streaming to FFMPEG gracefully.

init_output_directories

Initialise output directories.

write_frame

Used internally by Manim to write a frame to the FFMPEG input buffer.

Attributes

force_output_as_scene_name

add_partial_movie_file(hash_animation)[source]

Adds a new partial movie file path to scene.partial_movie_files and current section from a hash. This method will compute the path from the hash. In addition to that it adds the new animation to the current section.

Parameters:

hash_animation – Hash of the animation.

begin_animation(allow_write=True)[source]

Used internally by manim to stream the animation to FFMPEG for displaying or writing to a file.

Parameters:

allow_write – Whether or not to write to a video file.

clean_cache()[source]

Will clean the cache by removing the oldest partial_movie_files.

combine_to_movie()[source]

Used internally by Manim to combine the separate partial movie files that make up a Scene into a single video file for that Scene.

combine_to_section_videos()[source]

Concatenate partial movie files for each section.

end_animation(allow_write)[source]

Internally used by Manim to stop streaming to FFMPEG gracefully.

Parameters:

allow_write – Whether or not to write to a video file.

init_output_directories(scene_name)[source]

Initialise output directories.

Notes

The directories are read from config, for example config['media_dir']. If the target directories don’t already exist, they will be created.

write_frame(frame_or_renderer)[source]

Used internally by Manim to write a frame to the FFMPEG input buffer.

Parameters:

frame_or_renderer – Pixel array of the frame.