diff --git a/blender_cloud/blender.py b/blender_cloud/blender.py index ee6d254..26bb216 100644 --- a/blender_cloud/blender.py +++ b/blender_cloud/blender.py @@ -390,9 +390,13 @@ class BlenderCloudPreferences(AddonPreferences): path_box = job_output_box.row(align=True) output_path = render_output_path(context) - path_box.label(str(output_path)) - props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE') - props.path = str(output_path.parent) + if output_path: + path_box.label(str(output_path)) + props = path_box.operator('flamenco.explore_file_path', text='', icon='DISK_DRIVE') + props.path = str(output_path.parent) + else: + path_box.label('Blend file is not in your project path, ' + 'unable to give output path example.') flamenco_box.prop(self, 'flamenco_open_browser_after_submit') diff --git a/blender_cloud/flamenco/__init__.py b/blender_cloud/flamenco/__init__.py index 5f29d6f..5c42e12 100644 --- a/blender_cloud/flamenco/__init__.py +++ b/blender_cloud/flamenco/__init__.py @@ -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)