Global: adding colorspace context collector

This commit is contained in:
Jakub Jezek 2022-12-23 16:30:47 +01:00
parent 2239842eb7
commit 0c19c0edb6
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -0,0 +1,21 @@
from pyblish import api
from openpype.pipeline import (
get_imageio_config,
get_imageio_file_rules
)
class CollectColorspaceSettings(api.ContextPlugin):
"""Collect Colorspace Settings and store in the context."""
order = api.CollectorOrder
label = "Collect Colorspace Settings"
def process(self, context):
project_name = context.data["projectName"]
host = context.data["hostName"]
context.data["colorspace_config_path"] = get_imageio_config(
project_name, host)
context.data["colorspace_file_rules"] = get_imageio_file_rules(
project_name, host)