allow rendering scenes from any directory (#391)

This commit is contained in:
Devin Neal
2019-01-03 13:42:02 -08:00
committed by GitHub
parent 4d069db15c
commit 1de67af678
2 changed files with 8 additions and 12 deletions

View File

@ -20,14 +20,7 @@ def guarantee_existance(path):
def get_scene_output_directory(scene_class):
try:
file_path = os.path.abspath(inspect.getfile(scene_class))
file_path = os.path.relpath(file_path, THIS_DIR)
file_path = file_path.replace(".pyc", "")
file_path = file_path.replace(".py", "")
return guarantee_existance(os.path.join(VIDEO_DIR, file_path))
except TypeError:
return guarantee_existance(os.path.join(VIDEO_DIR, "input_scenes"))
return guarantee_existance(os.path.join(VIDEO_DIR, scene_class.__module__))
def get_movie_output_directory(scene_class, camera_config, frame_duration):