From 1cef0d48df79965678e5bcfeb8f61b2e29d582cf Mon Sep 17 00:00:00 2001 From: Yann Doersam Date: Tue, 8 Nov 2022 11:46:11 +0100 Subject: [PATCH] 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 --- addon/flamenco/operators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addon/flamenco/operators.py b/addon/flamenco/operators.py index c559c6cc..87919770 100644 --- a/addon/flamenco/operators.py +++ b/addon/flamenco/operators.py @@ -161,6 +161,11 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator): self.report({"WARNING"}, err) 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) # Check the job with the Manager, to see if it would be accepted.