mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Merge pull request #522 from 3b1b/fix_relative_paths
fix mishandled relative paths
This commit is contained in:
@ -165,6 +165,7 @@ def get_configuration(args):
|
||||
"png_mode": "RGBA" if args.transparent else "RGB",
|
||||
"movie_file_extension": ".mov" if args.transparent else ".mp4",
|
||||
"file_name": args.file_name,
|
||||
"input_file_path": args.file,
|
||||
}
|
||||
if hasattr(module, "OUTPUT_DIRECTORY"):
|
||||
file_writer_config["output_directory"] = module.OUTPUT_DIRECTORY
|
||||
|
@ -76,8 +76,9 @@ class SceneFileWriter(object):
|
||||
))
|
||||
|
||||
def get_default_output_directory(self):
|
||||
scene_module = self.scene.__class__.__module__
|
||||
return scene_module.replace(".", os.path.sep)
|
||||
filename = os.path.basename(self.input_file_path)
|
||||
root, ext = os.path.splitext(filename)
|
||||
return root if root else ext[1:]
|
||||
|
||||
def get_default_file_name(self):
|
||||
return self.scene.__class__.__name__
|
||||
|
Reference in New Issue
Block a user