From cdc0a80846f465d0f12ee6bfa83d28313676d327 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 18 Jan 2023 11:21:43 +0000 Subject: [PATCH] Fix When there is no Deadline setting avaliable. --- .../maya/plugins/publish/extract_workfile_xgen.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py index 13a04615eb..d37a03d1f6 100644 --- a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py +++ b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py @@ -37,12 +37,14 @@ class ExtractWorkfileXgen(publish.Extractor): ) return - publish_settings = instance.context["deadline"]["publish"] - if not publish_settings["MayaSubmitDeadline"]["use_published"]: - self.log.debug( - "Not using the published workfile. Abort Xgen extraction." - ) - return + deadline_settings = instance.context.get("deadline") + if deadline_settings: + publish_settings = deadline_settings["publish"] + if not publish_settings["MayaSubmitDeadline"]["use_published"]: + self.log.debug( + "Not using the published workfile. Abort Xgen extraction." + ) + return # Collect Xgen and Delta files. xgen_files = []