Addon: add dynamic tooltip on submit button when no job type is selected #104326

Merged
Sybren A. Stüvel merged 4 commits from abelli/flamenco:addon-tooltip into main 2024-09-05 14:46:16 +02:00
Showing only changes of commit 1abcf06031 - Show all commits

View File

@ -126,7 +126,7 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator):
def poll(cls, context: bpy.types.Context) -> bool: def poll(cls, context: bpy.types.Context) -> bool:
# Only allow submission when there is a job type selected. # Only allow submission when there is a job type selected.
job_type = job_types.active_job_type(context.scene) job_type = job_types.active_job_type(context.scene)
cls.poll_message_set("A job type must be selected first") cls.poll_message_set("No job type selected")
return job_type is not None return job_type is not None
def execute(self, context: bpy.types.Context) -> set[str]: def execute(self, context: bpy.types.Context) -> set[str]: