Update tests and documentation for ExtractorColormanaged refactor to ColormanagedPyblishPluginMixin

This commit is contained in:
Roy Nieterau 2023-03-13 23:00:03 +01:00
parent ed7a4e4243
commit ee7e2f1bcd
2 changed files with 4 additions and 4 deletions

View file

@ -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,

View file

@ -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.