From 4da0bcd5cd80406e98d67d4d3889d4a8a0c6422c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 12 Dec 2023 17:07:01 +0100 Subject: [PATCH] improving error comunication --- .../plugins/publish/collect_explicit_colorspace.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py index 3b62ed7e55..5dcc252f03 100644 --- a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py @@ -5,6 +5,7 @@ from openpype.pipeline import ( ) from openpype.lib import EnumDef from openpype.pipeline import colorspace +from openpype.pipeline.publish import KnownPublishError class CollectColorspace(pyblish.api.InstancePlugin, @@ -37,7 +38,6 @@ class CollectColorspace(pyblish.api.InstancePlugin, self.log.debug("Explicit colorspace name: {}".format(colorspace_name)) context = instance.context - context.data["colorspaceConfigItems"] = self.config_items for repre in instance.data.get("representations", {}): self.set_representation_colorspace( representation=repre, @@ -60,8 +60,11 @@ class CollectColorspace(pyblish.api.InstancePlugin, elif colorspace_data["type"] == "roles": return colorspace_data["colorspace"] else: - raise KeyError("Unknown colorspace type: {}".format( - colorspace_data["type"])) + raise KnownPublishError( + "Collecting of colorspace failed. used config is missing " + "colorspace type: '{}' .".format(colorspace_data["type"]) + "Please contact your pipeline TD." + ) @classmethod def apply_settings(cls, project_settings):