From ee7e2f1bcd4cc7d13935482b5f3ec1f1cf41347e Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 13 Mar 2023 23:00:03 +0100 Subject: [PATCH] Update tests and documentation for `ExtractorColormanaged` refactor to `ColormanagedPyblishPluginMixin` --- .../unit/openpype/pipeline/publish/test_publish_plugins.py | 6 +++--- website/docs/dev_colorspace.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py index 5c2d7b367f..88e0095e34 100644 --- a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py +++ b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py @@ -135,7 +135,7 @@ class TestPipelinePublishPlugins(TestPipeline): } # load plugin function for testing - plugin = publish_plugins.ExtractorColormanaged() + plugin = publish_plugins.ColormanagedPyblishPluginMixin() plugin.log = log config_data, file_rules = plugin.get_colorspace_settings(context) @@ -175,14 +175,14 @@ class TestPipelinePublishPlugins(TestPipeline): } # load plugin function for testing - plugin = publish_plugins.ExtractorColormanaged() + plugin = publish_plugins.ColormanagedPyblishPluginMixin() plugin.log = log plugin.set_representation_colorspace( representation_nuke, context, colorspace_settings=(config_data_nuke, file_rules_nuke) ) # load plugin function for testing - plugin = publish_plugins.ExtractorColormanaged() + plugin = publish_plugins.ColormanagedPyblishPluginMixin() plugin.log = log plugin.set_representation_colorspace( representation_hiero, context, diff --git a/website/docs/dev_colorspace.md b/website/docs/dev_colorspace.md index fe9a0ec1e3..14f19f10db 100644 --- a/website/docs/dev_colorspace.md +++ b/website/docs/dev_colorspace.md @@ -63,7 +63,7 @@ It's up to the Loaders to read these values and apply the correct expected color - set the `OCIO` environment variable before launching the host via a prelaunch hook - or (if the host allows) to set the workfile OCIO config path using the host's API -3. Each Extractor exporting pixel data (e.g. image or video) has to use parent class `openpype.pipeline.publish.publish_plugins.ExtractorColormanaged` and use `self.set_representation_colorspace` on the representations to be integrated. +3. Each Extractor exporting pixel data (e.g. image or video) has to inherit from the mixin class `openpype.pipeline.publish.publish_plugins.ColormanagedPyblishPluginMixin` and use `self.set_representation_colorspace` on the representations to be integrated. The **set_representation_colorspace** method adds `colorspaceData` to the representation. If the `colorspace` passed is not `None` then it is added directly to the representation with resolved config path otherwise a color space is assumed using the configured file rules. If no file rule matches the `colorspaceData` is **not** added to the representation.