Fix T99739: Add-on: Prevent job submission when no job type has been chosen
Prevent the `FLAMENCO_OT_submit_job` operator from running when there has been no job type selection.
This commit is contained in:
parent
cae0f73758
commit
19d3ac1a0a
@ -153,6 +153,14 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator):
|
|||||||
|
|
||||||
log = _log.getChild(bl_idname)
|
log = _log.getChild(bl_idname)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context: bpy.types.Context) -> bool:
|
||||||
|
# Only allow the
|
||||||
|
propgroup = getattr(context.scene, "flamenco_job_settings", None)
|
||||||
|
if propgroup is None:
|
||||||
|
return False
|
||||||
|
return getattr(propgroup, 'job_type', None) is not None
|
||||||
|
|
||||||
def invoke(self, context: bpy.types.Context, event: bpy.types.Event) -> set[str]:
|
def invoke(self, context: bpy.types.Context, event: bpy.types.Event) -> set[str]:
|
||||||
filepath = self._save_blendfile(context)
|
filepath = self._save_blendfile(context)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user