mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Moved VIDEO_DIR initializations to after MEDIA_DIR
This commit is contained in:
parent
92f4c0c001
commit
096f033954
1 changed files with 11 additions and 8 deletions
|
@ -6,6 +6,7 @@ VIDEO_DIR = ""
|
||||||
VIDEO_OUTPUT_DIR = ""
|
VIDEO_OUTPUT_DIR = ""
|
||||||
TEX_DIR = ""
|
TEX_DIR = ""
|
||||||
|
|
||||||
|
|
||||||
def initialize_directories(config):
|
def initialize_directories(config):
|
||||||
global MEDIA_DIR
|
global MEDIA_DIR
|
||||||
global VIDEO_DIR
|
global VIDEO_DIR
|
||||||
|
@ -13,14 +14,6 @@ def initialize_directories(config):
|
||||||
global TEX_DIR
|
global TEX_DIR
|
||||||
|
|
||||||
video_path_specified = config["video_dir"] or config["video_output_dir"]
|
video_path_specified = config["video_dir"] or config["video_output_dir"]
|
||||||
if not video_path_specified:
|
|
||||||
VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
|
|
||||||
elif config["video_output_dir"]:
|
|
||||||
VIDEO_OUTPUT_DIR = config["video_output_dir"]
|
|
||||||
else:
|
|
||||||
VIDEO_DIR = config["video_dir"]
|
|
||||||
|
|
||||||
TEX_DIR = config["tex_dir"] or os.path.join(MEDIA_DIR, "Tex")
|
|
||||||
|
|
||||||
if not (video_path_specified and config["tex_dir"]):
|
if not (video_path_specified and config["tex_dir"]):
|
||||||
if config["media_dir"]:
|
if config["media_dir"]:
|
||||||
|
@ -43,10 +36,20 @@ def initialize_directories(config):
|
||||||
"directory were both passed"
|
"directory were both passed"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TEX_DIR = config["tex_dir"] or os.path.join(MEDIA_DIR, "Tex")
|
||||||
|
if not video_path_specified:
|
||||||
|
VIDEO_DIR = os.path.join(MEDIA_DIR, "videos")
|
||||||
|
VIDEO_OUTPUT_DIR = os.path.join(MEDIA_DIR, "videos")
|
||||||
|
elif config["video_output_dir"]:
|
||||||
|
VIDEO_OUTPUT_DIR = config["video_output_dir"]
|
||||||
|
else:
|
||||||
|
VIDEO_DIR = config["video_dir"]
|
||||||
|
|
||||||
for folder in [VIDEO_DIR, VIDEO_OUTPUT_DIR, TEX_DIR]:
|
for folder in [VIDEO_DIR, VIDEO_OUTPUT_DIR, TEX_DIR]:
|
||||||
if folder != "" and not os.path.exists(folder):
|
if folder != "" and not os.path.exists(folder):
|
||||||
os.makedirs(folder)
|
os.makedirs(folder)
|
||||||
|
|
||||||
|
|
||||||
TEX_USE_CTEX = False
|
TEX_USE_CTEX = False
|
||||||
TEX_TEXT_TO_REPLACE = "YourTextHere"
|
TEX_TEXT_TO_REPLACE = "YourTextHere"
|
||||||
TEMPLATE_TEX_FILE = os.path.join(
|
TEMPLATE_TEX_FILE = os.path.join(
|
||||||
|
|
Loading…
Add table
Reference in a new issue