From 46a5907b34b9cb1f052a9660a4517c68528e9a53 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 19 May 2021 17:27:28 +0200 Subject: [PATCH] Hiero: collection of colorspace data to workfile instance and context --- .../plugins/publish/precollect_workfile.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/hiero/plugins/publish/precollect_workfile.py b/openpype/hosts/hiero/plugins/publish/precollect_workfile.py index bc4ef7e150..530a433423 100644 --- a/openpype/hosts/hiero/plugins/publish/precollect_workfile.py +++ b/openpype/hosts/hiero/plugins/publish/precollect_workfile.py @@ -75,10 +75,26 @@ class PrecollectWorkfile(pyblish.api.ContextPlugin): "activeProject": project, "otioTimeline": otio_timeline, "currentFile": curent_file, - "fps": fps, + "colorspace": self.get_colorspace(project), + "fps": fps } context.data.update(context_data) self.log.info("Creating instance: {}".format(instance)) self.log.debug("__ instance.data: {}".format(pformat(instance.data))) self.log.debug("__ context_data: {}".format(pformat(context_data))) + + def get_colorspace(self, project): + # get workfile's colorspace properties + return { + "useOCIOEnvironmentOverride": project.useOCIOEnvironmentOverride(), + "lutSetting16Bit": project.lutSetting16Bit(), + "lutSetting8Bit": project.lutSetting8Bit(), + "lutSettingFloat": project.lutSettingFloat(), + "lutSettingLog": project.lutSettingLog(), + "lutSettingViewer": project.lutSettingViewer(), + "lutSettingWorkingSpace": project.lutSettingWorkingSpace(), + "lutUseOCIOForExport": project.lutUseOCIOForExport(), + "ocioConfigName": project.ocioConfigName(), + "ocioConfigPath": project.ocioConfigPath() + }