From 6eb4b128409dcf6cd567be0cdf09e308a71f7bd9 Mon Sep 17 00:00:00 2001 From: Mateus Abelli Date: Thu, 5 Sep 2024 14:46:10 +0200 Subject: [PATCH] Addon: add 'disabled' message on submit button when no job type is selected Add a 'disabled' message on the Submit Job button when no job type has been selected yet. Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104326 --- addon/flamenco/operators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addon/flamenco/operators.py b/addon/flamenco/operators.py index 98599f2b..79753cbe 100644 --- a/addon/flamenco/operators.py +++ b/addon/flamenco/operators.py @@ -126,6 +126,7 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator): def poll(cls, context: bpy.types.Context) -> bool: # Only allow submission when there is a job type selected. job_type = job_types.active_job_type(context.scene) + cls.poll_message_set("No job type selected") return job_type is not None def execute(self, context: bpy.types.Context) -> set[str]: