Addon: Show error if the file path is not known before submitting
If file has never been saved, Flamenco cannot create a temp copy to submit. This caused an exception, which is now avoided by showing a clear error message instead. Maniphest Tasks: T102192 Differential Revision: https://developer.blender.org/D16358
This commit is contained in:
parent
f75a8f4c65
commit
1cef0d48df
@ -161,6 +161,11 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator):
|
|||||||
self.report({"WARNING"}, err)
|
self.report({"WARNING"}, err)
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
|
|
||||||
|
if not context.blend_data.filepath:
|
||||||
|
# The file path needs to be known before the file can be submitted.
|
||||||
|
self.report({"ERROR"}, "Please save your .blend file before submitting to Flamenco")
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
filepath = self._save_blendfile(context)
|
filepath = self._save_blendfile(context)
|
||||||
|
|
||||||
# Check the job with the Manager, to see if it would be accepted.
|
# Check the job with the Manager, to see if it would be accepted.
|
||||||
|
Loading…
Reference in New Issue
Block a user