mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Prefer pwd to install dir for temp files
Temp files are project specific and thus can stay in the current project directory. Also breaks things if the package is installed in a read-only location. Which could be expected because you don't generally expect the program directories to be modified (except by the package manager).
This commit is contained in:
@ -14,7 +14,7 @@ else:
|
||||
"Dropbox (3Blue1Brown)/3Blue1Brown Team Folder"
|
||||
)
|
||||
if not os.path.isdir(MEDIA_DIR):
|
||||
MEDIA_DIR = "media"
|
||||
MEDIA_DIR = "./media"
|
||||
print(
|
||||
f"Media will be stored in {MEDIA_DIR + os.sep}. You can change "
|
||||
"this behavior by writing a different directory to media_dir.txt."
|
||||
@ -26,7 +26,7 @@ SVG_IMAGE_DIR = os.path.join(MEDIA_DIR, "designs", "svg_images")
|
||||
SOUND_DIR = os.path.join(MEDIA_DIR, "designs", "sounds")
|
||||
###
|
||||
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
FILE_DIR = os.path.join(os.getenv("FILE_DIR", default=THIS_DIR), "files")
|
||||
FILE_DIR = os.path.join(os.getenv("FILE_DIR", default="."), "files")
|
||||
TEX_DIR = os.path.join(FILE_DIR, "Tex")
|
||||
# These two may be depricated now.
|
||||
MOBJECT_DIR = os.path.join(FILE_DIR, "mobjects")
|
||||
|
Reference in New Issue
Block a user