Prevent error when current file is outside Flamenco project path
This commit is contained in:
parent
3f95249196
commit
4608204f1d
@ -445,14 +445,17 @@ class FLAMENCO_PT_render(bpy.types.Panel):
|
|||||||
labeled_row.label('Output:')
|
labeled_row.label('Output:')
|
||||||
prop_btn_row = labeled_row.row(align=True)
|
prop_btn_row = labeled_row.row(align=True)
|
||||||
render_output = render_output_path(context)
|
render_output = render_output_path(context)
|
||||||
prop_btn_row.label(str(render_output))
|
if render_output is None:
|
||||||
props = prop_btn_row.operator(FLAMENCO_OT_explore_file_path.bl_idname,
|
prop_btn_row.label('Unable to render with Flamenco, outside of project directory.')
|
||||||
text='', icon='DISK_DRIVE')
|
else:
|
||||||
props.path = str(render_output.parent)
|
prop_btn_row.label(str(render_output))
|
||||||
|
props = prop_btn_row.operator(FLAMENCO_OT_explore_file_path.bl_idname,
|
||||||
|
text='', icon='DISK_DRIVE')
|
||||||
|
props.path = str(render_output.parent)
|
||||||
|
|
||||||
layout.operator(FLAMENCO_OT_render.bl_idname,
|
layout.operator(FLAMENCO_OT_render.bl_idname,
|
||||||
text='Render on Flamenco',
|
text='Render on Flamenco',
|
||||||
icon='RENDER_ANIMATION')
|
icon='RENDER_ANIMATION')
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
Reference in New Issue
Block a user