From 94175f94eb9465ff5ee2eaec03848f755620a1f1 Mon Sep 17 00:00:00 2001 From: Ben Souchet Date: Wed, 11 Sep 2024 13:29:19 +0200 Subject: [PATCH] Nuke Payload: Fix farm renderering (Add Gizmos and plugins to the NUKE_PATH) --- .../deadline/plugins/publish/submit_nuke_deadline.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openpype/modules/deadline/plugins/publish/submit_nuke_deadline.py b/openpype/modules/deadline/plugins/publish/submit_nuke_deadline.py index 9c2d2128067..f19452a486d 100644 --- a/openpype/modules/deadline/plugins/publish/submit_nuke_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_nuke_deadline.py @@ -403,6 +403,17 @@ def payload_submit( if self.env_allowed_keys: keys += self.env_allowed_keys + # Not all hosts can import this module. + import nuke + + # Add all gizmos and plugin paths to the NUKE_PATH for the render farm + nuke_path = os.environ.get("NUKE_PATH", "") + nuke_paths = [path for path in nuke_path.split(os.pathsep) if path] + for nuke_plugin_path in nuke.pluginPath(): + if nuke_plugin_path not in nuke_paths: + nuke_paths.append(nuke_plugin_path) + os.environ["NUKE_PATH"] = os.pathsep.join(nuke_paths) + environment = dict({key: os.environ[key] for key in keys if key in os.environ}, **legacy_io.Session)