From 855bf4d6c688b5ec74b215821745adb63d3853d4 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 29 Dec 2022 14:58:47 +0100 Subject: [PATCH] global: integrating colorspace data --- openpype/plugins/publish/integrate.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openpype/plugins/publish/integrate.py b/openpype/plugins/publish/integrate.py index 2ce8037f5f..c7c3e7a10e 100644 --- a/openpype/plugins/publish/integrate.py +++ b/openpype/plugins/publish/integrate.py @@ -529,6 +529,13 @@ class IntegrateAsset(pyblish.api.InstancePlugin): template_data["representation"] = repre["name"] template_data["ext"] = repre["ext"] + # add template data for colorspaceData + if repre.get("colorspaceData"): + colorspace = repre["colorspaceData"]["colorspace"] + # replace spaces with underscores + colorspace = colorspace.replace(" ", "_") + template_data["colorspace"] = colorspace + # optionals # retrieve additional anatomy data from representation if exists for key, anatomy_key in { @@ -726,6 +733,11 @@ class IntegrateAsset(pyblish.api.InstancePlugin): # and the actual representation entity for the database data = repre.get("data", {}) data.update({"path": published_path, "template": template}) + + # add colorspace data if any exists on represenation + if repre.get("colorspaceData"): + data["colorspaceData"] = repre["colorspaceData"] + repre_doc = new_representation_doc( repre["name"], version["_id"], repre_context, data, repre_id )