3b1b-manim/manimlib/utils/directories.py

49 lines
1 KiB
Python
Raw Normal View History

import os
from manimlib.utils.file_ops import guarantee_existence
2021-01-15 10:16:37 -10:00
from manimlib.utils.customization import get_customization
def get_directories():
2021-01-15 10:16:37 -10:00
return get_customization()["directories"]
def get_temp_dir():
return get_directories()["temporary_storage"]
def get_tex_dir():
return guarantee_existence(os.path.join(get_temp_dir(), "Tex"))
2021-01-15 20:18:13 +08:00
def get_text_dir():
return guarantee_existence(os.path.join(get_temp_dir(), "Text"))
def get_mobject_data_dir():
return guarantee_existence(os.path.join(get_temp_dir(), "mobject_data"))
2021-03-18 17:33:20 -07:00
def get_downloads_dir():
return guarantee_existence(os.path.join(get_temp_dir(), "manim_downloads"))
def get_output_dir():
return guarantee_existence(get_directories()["output"])
def get_raster_image_dir():
return get_directories()["raster_images"]
def get_vector_image_dir():
return get_directories()["vector_images"]
2021-01-23 11:02:02 -08:00
def get_sound_dir():
return get_directories()["sounds"]
def get_shader_dir():
return get_directories()["shaders"]