Fixed bugs when blendfile is outside the project directory

This commit is contained in:
2017-02-01 14:00:46 +01:00
parent 3814fb2683
commit 33da5195f3
2 changed files with 12 additions and 4 deletions

View File

@@ -406,7 +406,11 @@ def _render_output_path(
is fast.
"""
project_path = Path(bpy.path.abspath(local_project_path)).resolve()
try:
project_path = Path(bpy.path.abspath(local_project_path)).resolve()
except FileNotFoundError:
# Path.resolve() will raise a FileNotFoundError if the project path doesn't exist.
return None
try:
proj_rel = blend_filepath.parent.relative_to(project_path)