support for inline scenes

This commit is contained in:
Devin Neal
2018-12-24 12:49:10 -08:00
parent 3543a750ba
commit 9366accf59
3 changed files with 22 additions and 13 deletions

View File

@ -20,12 +20,14 @@ def guarantee_existance(path):
def get_scene_output_directory(scene_class):
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))
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"))
def get_movie_output_directory(scene_class, camera_config, frame_duration):