From 3227afae7d7e1f30314a0ad1d39f6c08b3d5b5d2 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 12 Mar 2024 16:10:54 +0100 Subject: [PATCH 1/2] Fix when no RR addon in bundle --- client/ayon_core/hosts/maya/plugins/publish/collect_render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/hosts/maya/plugins/publish/collect_render.py b/client/ayon_core/hosts/maya/plugins/publish/collect_render.py index 19e0c133c4..3294e1d609 100644 --- a/client/ayon_core/hosts/maya/plugins/publish/collect_render.py +++ b/client/ayon_core/hosts/maya/plugins/publish/collect_render.py @@ -290,8 +290,8 @@ def process(self, instance): "colorspaceView": colorspace_data["view"], } - rr_settings = context.data["project_settings"]["royalrender"] - if rr_settings["enabled"]: + rr_settings = context.data["project_settings"].get("royalrender", {}) + if rr_settings: data["rrPathName"] = instance.data.get("rrPathName") self.log.debug(data["rrPathName"]) From 8cff941a0562e98a33925f73cb1494e3e2a61c5f Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 13 Mar 2024 10:31:17 +0100 Subject: [PATCH 2/2] Changed to use module manager Settings are not necessary, used only to check if there is a RR addon enabled. This seems cleanere. --- client/ayon_core/hosts/maya/plugins/publish/collect_render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/hosts/maya/plugins/publish/collect_render.py b/client/ayon_core/hosts/maya/plugins/publish/collect_render.py index 3294e1d609..13eb8fd49e 100644 --- a/client/ayon_core/hosts/maya/plugins/publish/collect_render.py +++ b/client/ayon_core/hosts/maya/plugins/publish/collect_render.py @@ -290,8 +290,8 @@ def process(self, instance): "colorspaceView": colorspace_data["view"], } - rr_settings = context.data["project_settings"].get("royalrender", {}) - if rr_settings: + manager = context.data["ayonAddonsManager"] + if manager.get_enabled_addon("royalrender") is not None: data["rrPathName"] = instance.data.get("rrPathName") self.log.debug(data["rrPathName"])