Merge pull request #522 from 3b1b/fix_relative_paths

fix mishandled relative paths
This commit is contained in:
Devin Neal
2019-05-01 08:12:42 -07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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__