mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-06-21 13:04:03 +08:00
disable caching limit while rendering
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import shutil
|
import shutil
|
||||||
from manim import Scene
|
from manim import Scene, config
|
||||||
|
|
||||||
class Slide(Scene):
|
class Slide(Scene):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
@ -44,7 +44,14 @@ class Slide(Scene):
|
|||||||
self.pause_start_animation = self.current_animation
|
self.pause_start_animation = self.current_animation
|
||||||
|
|
||||||
def render(self, *args, **kwargs):
|
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)
|
super(Slide, self).render(*args, **kwargs)
|
||||||
|
|
||||||
|
config["max_files_cached"] = max_files_cached
|
||||||
|
|
||||||
if not os.path.exists(self.output_folder):
|
if not os.path.exists(self.output_folder):
|
||||||
os.mkdir(self.output_folder)
|
os.mkdir(self.output_folder)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user