Fixed bugs when blendfile is outside the project directory
This commit is contained in:
parent
3814fb2683
commit
33da5195f3
@ -390,9 +390,13 @@ class BlenderCloudPreferences(AddonPreferences):
|
||||
|
||||
path_box = job_output_box.row(align=True)
|
||||
output_path = render_output_path(context)
|
||||
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')
|
||||
|
||||
|
@ -406,7 +406,11 @@ def _render_output_path(
|
||||
is fast.
|
||||
"""
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user