From a17e4628911aef24442057f729e16af136f17f36 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 27 Jan 2022 00:39:20 +0100 Subject: [PATCH] Get OpenPype executable directly from Event Plug-in Config --- vendor/deadline/custom/plugins/GlobalJobPreLoad.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vendor/deadline/custom/plugins/GlobalJobPreLoad.py b/vendor/deadline/custom/plugins/GlobalJobPreLoad.py index ba1e5f6c6a..9fdcc1e4ad 100644 --- a/vendor/deadline/custom/plugins/GlobalJobPreLoad.py +++ b/vendor/deadline/custom/plugins/GlobalJobPreLoad.py @@ -8,6 +8,12 @@ import platform from Deadline.Scripting import RepositoryUtils, FileUtils +def get_openpype_executable(): + """Return OpenPype Executable from Event Plug-in Settings""" + config = RepositoryUtils.GetEventPluginConfig("OpenPype") + return config.GetConfigEntryWithDefault("OpenPypeExecutable", "") + + def inject_openpype_environment(deadlinePlugin): """ Pull env vars from OpenPype and push them to rendering process. @@ -19,7 +25,7 @@ def inject_openpype_environment(deadlinePlugin): print(">>> Injecting OpenPype environments ...") try: print(">>> Getting OpenPype executable ...") - exe_list = job.GetJobExtraInfoKeyValue("openpype_executables") + exe_list = get_openpype_executable() openpype_app = FileUtils.SearchFileList(exe_list) if openpype_app == "": raise RuntimeError(