From 4bbc387b8107cbac346beaff0495cb74e7eb6cc6 Mon Sep 17 00:00:00 2001 From: Federico Galatolo Date: Sat, 24 Apr 2021 15:39:34 +0200 Subject: [PATCH] disable caching limit while rendering --- manim_presentation/slide.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manim_presentation/slide.py b/manim_presentation/slide.py index 7652fbe..c6a28ca 100644 --- a/manim_presentation/slide.py +++ b/manim_presentation/slide.py @@ -1,7 +1,7 @@ import os import json import shutil -from manim import Scene +from manim import Scene, config class Slide(Scene): def __init__(self, *args, **kwargs): @@ -44,7 +44,14 @@ class Slide(Scene): self.pause_start_animation = self.current_animation def render(self, *args, **kwargs): + # We need to disable the caching limit since we rely on intermidiate files + max_files_cached = config["max_files_cached"] + config["max_files_cached"] = float("inf") + super(Slide, self).render(*args, **kwargs) + + config["max_files_cached"] = max_files_cached + if not os.path.exists(self.output_folder): os.mkdir(self.output_folder)