Addon: add dynamic tooltip on submit button when no job type is selected #104326
@ -122,6 +122,14 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator):
|
|||||||
|
|
||||||
log = _log.getChild(bl_idname)
|
log = _log.getChild(bl_idname)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def description(cls, context: bpy.types.Context, properties) -> str:
|
||||||
|
tip_text = cls.bl_description
|
||||||
|
job_type = job_types.active_job_type(context.scene)
|
||||||
|
if job_type is not None:
|
||||||
|
return tip_text
|
||||||
|
return tip_text + "\nA job type must be selected first"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user