From b430d9f71db9699add0a07140af31c267a822ad9 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 21:05:56 +0100 Subject: [PATCH 01/76] cross hosts: enhancing imageio settings with Enable toggle also adding imageio settings to Max --- .../project_settings/aftereffects.json | 1 + .../defaults/project_settings/blender.json | 1 + .../defaults/project_settings/celaction.json | 1 + .../defaults/project_settings/flame.json | 1 + .../defaults/project_settings/fusion.json | 1 + .../defaults/project_settings/harmony.json | 1 + .../defaults/project_settings/hiero.json | 1 + .../defaults/project_settings/houdini.json | 1 + .../defaults/project_settings/max.json | 11 +++++++++ .../defaults/project_settings/maya.json | 1 + .../defaults/project_settings/nuke.json | 1 + .../defaults/project_settings/photoshop.json | 1 + .../defaults/project_settings/resolve.json | 1 + .../project_settings/traypublisher.json | 1 + .../defaults/project_settings/tvpaint.json | 1 + .../defaults/project_settings/unreal.json | 1 + .../project_settings/webpublisher.json | 1 + .../schema_project_aftereffects.json | 6 +++++ .../schema_project_blender.json | 6 +++++ .../schema_project_celaction.json | 6 +++++ .../projects_schema/schema_project_flame.json | 6 +++++ .../schema_project_fusion.json | 6 +++++ .../schema_project_harmony.json | 6 +++++ .../projects_schema/schema_project_hiero.json | 6 +++++ .../schema_project_houdini.json | 8 ++++++- .../projects_schema/schema_project_max.json | 23 +++++++++++++++++++ .../projects_schema/schema_project_maya.json | 6 +++++ .../schema_project_photoshop.json | 6 +++++ .../schema_project_resolve.json | 6 +++++ .../schema_project_traypublisher.json | 6 +++++ .../schema_project_tvpaint.json | 6 +++++ .../schema_project_unreal.json | 6 +++++ .../schema_project_webpublisher.json | 6 +++++ .../schemas/schema_nuke_imageio.json | 8 ++++++- 34 files changed, 148 insertions(+), 2 deletions(-) diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index 669e1db0b8..d1b2309d26 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index 20eec0c09d..d9aabea9ad 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/celaction.json b/openpype/settings/defaults/project_settings/celaction.json index 822604fd2f..10dfd70ac6 100644 --- a/openpype/settings/defaults/project_settings/celaction.json +++ b/openpype/settings/defaults/project_settings/celaction.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/flame.json b/openpype/settings/defaults/project_settings/flame.json index 5a13d81384..f323af7496 100644 --- a/openpype/settings/defaults/project_settings/flame.json +++ b/openpype/settings/defaults/project_settings/flame.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index f974eebaca..9130c9322c 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/harmony.json b/openpype/settings/defaults/project_settings/harmony.json index 3f51a9c28b..97c9cdf761 100644 --- a/openpype/settings/defaults/project_settings/harmony.json +++ b/openpype/settings/defaults/project_settings/harmony.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index 100c1f5b47..65d6da59f9 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 1b7faf8526..8d7f9865c5 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index d59cdf8c4a..8df4d0ca57 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,4 +1,15 @@ { + "imageio": { + "enabled": false, + "ocio_config": { + "enabled": false, + "filepath": [] + }, + "file_rules": { + "enabled": false, + "rules": {} + } + }, "RenderSettings": { "default_render_image_folder": "renders/3dsmax", "aov_separator": "underscore", diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 2aa95fd1be..aa05ae145b 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -1,6 +1,7 @@ { "open_workfile_post_initialization": false, "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index c249955dc8..72f599c98b 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -9,6 +9,7 @@ } }, "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/photoshop.json b/openpype/settings/defaults/project_settings/photoshop.json index bcf21f55dd..9fd4fe54f1 100644 --- a/openpype/settings/defaults/project_settings/photoshop.json +++ b/openpype/settings/defaults/project_settings/photoshop.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/resolve.json b/openpype/settings/defaults/project_settings/resolve.json index 264f3bd902..3720dc54f4 100644 --- a/openpype/settings/defaults/project_settings/resolve.json +++ b/openpype/settings/defaults/project_settings/resolve.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/traypublisher.json b/openpype/settings/defaults/project_settings/traypublisher.json index fdea4aeaba..311c5b0cfc 100644 --- a/openpype/settings/defaults/project_settings/traypublisher.json +++ b/openpype/settings/defaults/project_settings/traypublisher.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/tvpaint.json b/openpype/settings/defaults/project_settings/tvpaint.json index 9173a8c3d5..5da63110be 100644 --- a/openpype/settings/defaults/project_settings/tvpaint.json +++ b/openpype/settings/defaults/project_settings/tvpaint.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index 75cee11bd9..d83e090fae 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/webpublisher.json b/openpype/settings/defaults/project_settings/webpublisher.json index e830ba6a40..a9dc9012eb 100644 --- a/openpype/settings/defaults/project_settings/webpublisher.json +++ b/openpype/settings/defaults/project_settings/webpublisher.json @@ -1,5 +1,6 @@ { "imageio": { + "enabled": false, "ocio_config": { "enabled": false, "filepath": [] diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 8dc83f5506..2d48e06ccb 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 725d9bfb08..2e4dcb4e31 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index c5ca3eb9f5..efecb2a89c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index aab8f21d15..7c839037ad 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 464cf2c06d..87856380ac 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "collapsible": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index e6bf835c9f..da80648a14 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index f44f92438c..3e9ac41b1c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -11,7 +11,13 @@ "label": "Color Management (ImageIO)", "is_group": true, "collapsible": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 24b06f77db..74ffbbe9f4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" @@ -35,4 +41,4 @@ "name": "schema_houdini_publish" } ] -} \ No newline at end of file +} diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 4fba9aff0a..de7b4aca0b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -5,6 +5,29 @@ "label": "Max", "is_file": true, "children": [ + { + "key": "imageio", + "type": "dict", + "label": "Color Management (ImageIO)", + "is_group": true, + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "schema", + "name": "schema_imageio_config" + }, + { + "type": "schema", + "name": "schema_imageio_file_rules" + } + + ] + }, { "type": "dict", "collapsible": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 47dfb37024..8373a57429 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -16,7 +16,13 @@ "label": "Color Management (ImageIO)", "collapsible": true, "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index 0071e632af..95f402ca7c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index b326f22394..da252dd9b1 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index 2ef1d2a414..4bce299747 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index 708b688ba5..3af5e7f5ca 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 8988dd2ff0..b330fd600f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index 66ccca644d..d0c2145298 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -10,7 +10,13 @@ "type": "dict", "label": "Color Management (ImageIO)", "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 1cd6f0e67f..743b0d66a6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -4,7 +4,13 @@ "label": "Color Management (ImageIO)", "collapsible": true, "is_group": true, + "checkbox_key": "enabled", "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, { "type": "label", "label": "'Custom OCIO config path' has deprecated.
If you need to set custom config, just enable and add path into 'OCIO config'.
Anatomy keys are supported.." @@ -257,4 +263,4 @@ ] } ] -} \ No newline at end of file +} From 52f4b75b62b3776f7b1a3c4d65690b3e5b53cace Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 22:30:23 +0100 Subject: [PATCH 02/76] Flame: skip colorspace management if imageio is not enabled also set enabled to True by default since some productions are already using it --- openpype/hosts/flame/hooks/pre_flame_setup.py | 21 +++++++++++++++---- .../defaults/project_settings/flame.json | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 713daf1031..6367e132de 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -47,6 +47,13 @@ class FlamePrelaunch(PreLaunchHook): imageio_flame = project_settings["flame"]["imageio"] + colormanaged = True + # check if host settings are having enabled key and if it is False + if imageio_flame.get("enabled") and imageio_flame["enabled"] is False: + # if host settings are disabled return False because + # it is expected that no colorspace management is needed + colormanaged = False + # get user name and host name user_name = get_openpype_username() user_name = user_name.replace(".", "_") @@ -68,9 +75,7 @@ class FlamePrelaunch(PreLaunchHook): "FrameWidth": int(width), "FrameHeight": int(height), "AspectRatio": float((width / height) * _db_p_data["pixelAspect"]), - "FrameRate": self._get_flame_fps(fps), - "FrameDepth": str(imageio_flame["project"]["frameDepth"]), - "FieldDominance": str(imageio_flame["project"]["fieldDominance"]) + "FrameRate": self._get_flame_fps(fps) } data_to_script = { @@ -78,7 +83,6 @@ class FlamePrelaunch(PreLaunchHook): "host_name": _env.get("FLAME_WIRETAP_HOSTNAME") or hostname, "volume_name": volume_name, "group_name": _env.get("FLAME_WIRETAP_GROUP"), - "color_policy": str(imageio_flame["project"]["colourPolicy"]), # from project "project_name": project_name, @@ -86,6 +90,15 @@ class FlamePrelaunch(PreLaunchHook): "project_data": project_data } + # add color management data + if colormanaged: + project_data.update({ + "FrameDepth": str(imageio_flame["project"]["frameDepth"]), + "FieldDominance": str(imageio_flame["project"]["fieldDominance"]) + }) + data_to_script["color_policy"] = str( + imageio_flame["project"]["colourPolicy"]) + self.log.info(pformat(dict(_env))) self.log.info(pformat(data_to_script)) diff --git a/openpype/settings/defaults/project_settings/flame.json b/openpype/settings/defaults/project_settings/flame.json index f323af7496..5eb6ec2d2a 100644 --- a/openpype/settings/defaults/project_settings/flame.json +++ b/openpype/settings/defaults/project_settings/flame.json @@ -1,6 +1,6 @@ { "imageio": { - "enabled": false, + "enabled": true, "ocio_config": { "enabled": false, "filepath": [] From e09fea633417f5ca7d193e022673466a279bedc7 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 22:31:16 +0100 Subject: [PATCH 03/76] global: adding imageio enable switch to colorspace module --- openpype/pipeline/colorspace.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 2085e2d37f..e42838d9dd 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -336,6 +336,7 @@ def get_imageio_config( anatomy_data = get_template_data_from_session() formatting_data = deepcopy(anatomy_data) + # add project roots to anatomy data formatting_data["root"] = anatomy.roots formatting_data["platform"] = platform.system().lower() @@ -344,6 +345,12 @@ def get_imageio_config( imageio_global, imageio_host = _get_imageio_settings( project_settings, host_name) + # check if host settings are having enabled key and if it is False + if imageio_host.get("enabled") and imageio_host["enabled"] is False: + # if host settings are disabled return False because + # it is expected that no colorspace management is needed + return False + config_host = imageio_host.get("ocio_config", {}) if config_host.get("enabled"): From 75aee631c18d9dc2eb1cd9e31d6a4f1785a00cd2 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 22:31:50 +0100 Subject: [PATCH 04/76] Nuke: implementing imageio enable switch --- openpype/hosts/nuke/api/lib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 2a14096f0e..1296bca9b0 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2001,18 +2001,18 @@ class WorkfileSettings(object): "Attention! Viewer nodes {} were erased." "It had wrong color profile".format(erased_viewers)) - def set_root_colorspace(self, nuke_colorspace): + def set_root_colorspace(self, imageio_host): ''' Adds correct colorspace to root Arguments: - nuke_colorspace (dict): adjustmensts from presets + imageio_host (dict): adjustments from presets ''' - workfile_settings = nuke_colorspace["workfile"] + workfile_settings = imageio_host["workfile"] - # resolve config data if they are enabled in host + # get config data if imageio is enabled config_data = None - if nuke_colorspace.get("ocio_config", {}).get("enabled"): + if imageio_host.get("enabled") and imageio_host["enabled"] is True: # switch ocio config to custom config workfile_settings["OCIO_config"] = "custom" workfile_settings["colorManagement"] = "OCIO" From 4f430c56bb9aeef4baeabdbe47bc862b10c6ae37 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 22:32:01 +0100 Subject: [PATCH 05/76] Maya: implementing imageio enable switch --- openpype/hosts/maya/plugins/load/load_image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/hosts/maya/plugins/load/load_image.py b/openpype/hosts/maya/plugins/load/load_image.py index b464c268fc..552bcc33af 100644 --- a/openpype/hosts/maya/plugins/load/load_image.py +++ b/openpype/hosts/maya/plugins/load/load_image.py @@ -273,6 +273,11 @@ class FileNodeLoader(load.LoaderPlugin): project_name, host_name, project_settings=project_settings ) + + # ignore if host imageio is not enabled + if not config_data: + return + file_rules = get_imageio_file_rules( project_name, host_name, project_settings=project_settings From f388fa3e1670342f2501bb2e5d0d5a670e4cc46a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 23 Mar 2023 22:32:13 +0100 Subject: [PATCH 06/76] Fusion: implementing imageio enable switch --- openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py b/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py index 6bf0f55081..4dfb4ef223 100644 --- a/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py +++ b/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py @@ -26,7 +26,9 @@ class FusionPreLaunchOCIO(PreLaunchHook): anatomy_data=template_data, anatomy=self.data["anatomy"] ) - ocio_path = config_data["path"] - self.log.info(f"Setting OCIO config path: {ocio_path}") - self.launch_context.env["OCIO"] = ocio_path + if config_data: + ocio_path = config_data["path"] + + self.log.info(f"Setting OCIO config path: {ocio_path}") + self.launch_context.env["OCIO"] = ocio_path From 56a775710fd2fc4f1dec8051ed824e54062efab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Fri, 24 Mar 2023 14:22:18 +0100 Subject: [PATCH 07/76] Update openpype/hosts/flame/hooks/pre_flame_setup.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- openpype/hosts/flame/hooks/pre_flame_setup.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 6367e132de..019bf1adda 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -47,12 +47,9 @@ class FlamePrelaunch(PreLaunchHook): imageio_flame = project_settings["flame"]["imageio"] - colormanaged = True - # check if host settings are having enabled key and if it is False - if imageio_flame.get("enabled") and imageio_flame["enabled"] is False: - # if host settings are disabled return False because - # it is expected that no colorspace management is needed - colormanaged = False + colormanaged = imageio_flame.get("enabled") + if colormanaged is None: + colormanaged = True # get user name and host name user_name = get_openpype_username() From 5feee4cdff183b6dc119ffd25bbea9c15245b7ad Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 24 Mar 2023 14:30:49 +0100 Subject: [PATCH 08/76] hound --- openpype/hosts/flame/hooks/pre_flame_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 6367e132de..a5cab84d0d 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -94,7 +94,8 @@ class FlamePrelaunch(PreLaunchHook): if colormanaged: project_data.update({ "FrameDepth": str(imageio_flame["project"]["frameDepth"]), - "FieldDominance": str(imageio_flame["project"]["fieldDominance"]) + "FieldDominance": str( + imageio_flame["project"]["fieldDominance"]) }) data_to_script["color_policy"] = str( imageio_flame["project"]["colourPolicy"]) From 4ee7604dd7518188f1a9c4662402463b2a558520 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 24 Mar 2023 14:46:30 +0100 Subject: [PATCH 09/76] hound --- openpype/hosts/flame/hooks/pre_flame_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index c6db0d6462..3249fbfe9a 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -92,7 +92,7 @@ class FlamePrelaunch(PreLaunchHook): project_data.update({ "FrameDepth": str(imageio_flame["project"]["frameDepth"]), "FieldDominance": str( - imageio_flame["project"]["fieldDominance"]) + imageio_flame["project"]["fieldDominance"]) }) data_to_script["color_policy"] = str( imageio_flame["project"]["colourPolicy"]) From a1e57e54cdf11be787406fd61b91ee823d99a0e1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 28 Mar 2023 22:19:22 +0200 Subject: [PATCH 10/76] more explicit condition for backward compatibility --- openpype/pipeline/colorspace.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index e42838d9dd..5c7442e1c9 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -345,8 +345,13 @@ def get_imageio_config( imageio_global, imageio_host = _get_imageio_settings( project_settings, host_name) - # check if host settings are having enabled key and if it is False - if imageio_host.get("enabled") and imageio_host["enabled"] is False: + # check if host settings group is having enabled key + imageio_enabled = imageio_host.get("enabled") + if imageio_enabled is None: + # it it does not have enabled key, use global settings + imageio_enabled = True + + if not imageio_enabled : # if host settings are disabled return False because # it is expected that no colorspace management is needed return False From f6ac8138b3649b4a6ad5239c094b8636c4dbcb88 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 28 Mar 2023 22:30:48 +0200 Subject: [PATCH 11/76] simplification of condition --- openpype/hosts/nuke/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 1296bca9b0..411c0afb8a 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2012,7 +2012,7 @@ class WorkfileSettings(object): # get config data if imageio is enabled config_data = None - if imageio_host.get("enabled") and imageio_host["enabled"] is True: + if imageio_host.get("enabled"): # switch ocio config to custom config workfile_settings["OCIO_config"] = "custom" workfile_settings["colorManagement"] = "OCIO" From 6f1f4046d3a9e957cb89087cc5caf84c806f6cdd Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 28 Mar 2023 22:48:32 +0200 Subject: [PATCH 12/76] creating global prelaunch hook for OCIO env var --- .../pre_ocio_hook.py} | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) rename openpype/{hosts/fusion/hooks/pre_fusion_ocio_hook.py => hooks/pre_ocio_hook.py} (80%) diff --git a/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py similarity index 80% rename from openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py rename to openpype/hooks/pre_ocio_hook.py index 4dfb4ef223..ff16a8d174 100644 --- a/openpype/hosts/fusion/hooks/pre_fusion_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -4,9 +4,17 @@ from openpype.pipeline.colorspace import get_imageio_config from openpype.pipeline.template_data import get_template_data_with_names -class FusionPreLaunchOCIO(PreLaunchHook): - """Set OCIO environment variable for Fusion""" - app_groups = ["fusion"] +class OCIOEnvHook(PreLaunchHook): + """Set OCIO environment variable for hosts that use OpenColorIO.""" + + order = 0 + app_groups = [ + "fusion", + "blender", + "aftereffects", + "3dsmax", + "houdini" + ] def execute(self): """Hook entry method.""" From f58bcc8abbaf5d2de14ae31d67fe872c2fd74e0a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 28 Mar 2023 23:25:33 +0200 Subject: [PATCH 13/76] flame in line comments --- openpype/hosts/flame/hooks/pre_flame_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 3249fbfe9a..b5939b168c 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -47,7 +47,10 @@ class FlamePrelaunch(PreLaunchHook): imageio_flame = project_settings["flame"]["imageio"] + # get host imageio settings enabled key if exists colormanaged = imageio_flame.get("enabled") + # if key was not found, set to True + # ensuring backward compatibility if colormanaged is None: colormanaged = True From 62eb6d269b82d19510d30d80a82878fa1042939d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 28 Mar 2023 23:29:45 +0200 Subject: [PATCH 14/76] making docstring more readable --- openpype/hosts/nuke/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 411c0afb8a..d183f2fea9 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2005,7 +2005,7 @@ class WorkfileSettings(object): ''' Adds correct colorspace to root Arguments: - imageio_host (dict): adjustments from presets + imageio_host (dict): host colorspace configurations ''' workfile_settings = imageio_host["workfile"] From 4c78f3044118c1623000e5a7f385d1041d0a7713 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 6 Apr 2023 15:42:02 +0200 Subject: [PATCH 15/76] maya: adding maya to global ocio prelaunch hook --- openpype/hooks/pre_ocio_hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index ff16a8d174..f51e9f48d8 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -13,7 +13,8 @@ class OCIOEnvHook(PreLaunchHook): "blender", "aftereffects", "3dsmax", - "houdini" + "houdini", + "maya" ] def execute(self): From ae0d6dd1b5d80eec95958da110bc420b5cfc668b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 12 Apr 2023 17:25:41 +0200 Subject: [PATCH 16/76] refactoring of settings for more explicitly communicated attributes --- .../project_settings/aftereffects.json | 6 ++-- .../defaults/project_settings/blender.json | 6 ++-- .../defaults/project_settings/celaction.json | 6 ++-- .../defaults/project_settings/flame.json | 6 ++-- .../defaults/project_settings/fusion.json | 6 ++-- .../defaults/project_settings/global.json | 1 - .../defaults/project_settings/harmony.json | 6 ++-- .../defaults/project_settings/hiero.json | 6 ++-- .../defaults/project_settings/houdini.json | 6 ++-- .../defaults/project_settings/max.json | 6 ++-- .../defaults/project_settings/maya.json | 6 ++-- .../defaults/project_settings/nuke.json | 11 ++---- .../defaults/project_settings/photoshop.json | 6 ++-- .../defaults/project_settings/resolve.json | 6 ++-- .../project_settings/traypublisher.json | 6 ++-- .../defaults/project_settings/tvpaint.json | 6 ++-- .../defaults/project_settings/unreal.json | 6 ++-- .../project_settings/webpublisher.json | 6 ++-- .../schema_project_aftereffects.json | 6 ++-- .../schema_project_blender.json | 6 ++-- .../schema_project_celaction.json | 6 ++-- .../projects_schema/schema_project_flame.json | 6 ++-- .../schema_project_fusion.json | 6 ++-- .../schema_project_global.json | 35 +++++++++++++++++-- .../schema_project_harmony.json | 6 ++-- .../projects_schema/schema_project_hiero.json | 7 ++-- .../schema_project_houdini.json | 6 ++-- .../projects_schema/schema_project_max.json | 6 ++-- .../projects_schema/schema_project_maya.json | 5 ++- .../schema_project_photoshop.json | 6 ++-- .../schema_project_resolve.json | 6 ++-- .../schema_project_traypublisher.json | 6 ++-- .../schema_project_tvpaint.json | 6 ++-- .../schema_project_unreal.json | 6 ++-- .../schema_project_webpublisher.json | 6 ++-- .../schemas/schema_imageio_config.json | 7 ++-- .../schemas/schema_imageio_file_rules.json | 7 ++-- .../schemas/schema_nuke_imageio.json | 19 ++-------- 38 files changed, 139 insertions(+), 133 deletions(-) diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index d1b2309d26..74bd519bbd 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index d9aabea9ad..8328ceeda3 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/celaction.json b/openpype/settings/defaults/project_settings/celaction.json index 10dfd70ac6..0e8b465118 100644 --- a/openpype/settings/defaults/project_settings/celaction.json +++ b/openpype/settings/defaults/project_settings/celaction.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/flame.json b/openpype/settings/defaults/project_settings/flame.json index 5eb6ec2d2a..64021baeef 100644 --- a/openpype/settings/defaults/project_settings/flame.json +++ b/openpype/settings/defaults/project_settings/flame.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": true, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} }, "project": { diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index 9130c9322c..fa44bbe3d4 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} }, "ocio": { diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index 4c4a7487cf..fccd02d130 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -7,7 +7,6 @@ ] }, "file_rules": { - "enabled": false, "rules": { "example": { "pattern": ".*(beauty).*", diff --git a/openpype/settings/defaults/project_settings/harmony.json b/openpype/settings/defaults/project_settings/harmony.json index 97c9cdf761..e6fb00a700 100644 --- a/openpype/settings/defaults/project_settings/harmony.json +++ b/openpype/settings/defaults/project_settings/harmony.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index df460e0d86..b7d5d9af23 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} }, "workfile": { diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 8d7f9865c5..2b7192ff99 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index 8df4d0ca57..f6462c3d9a 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 6016323b4b..fa3a7bc648 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -1,13 +1,13 @@ { "open_workfile_post_initialization": false, "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} }, "colorManagementPreference_v2": { diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 0573df028d..1dd0e5128a 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -9,13 +9,13 @@ } }, "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} }, "viewer": { @@ -27,11 +27,6 @@ "workfile": { "colorManagement": "Nuke", "OCIO_config": "nuke-default", - "customOCIOConfigPath": { - "windows": [], - "darwin": [], - "linux": [] - }, "workingSpaceLUT": "linear", "monitorLut": "sRGB", "int8Lut": "sRGB", diff --git a/openpype/settings/defaults/project_settings/photoshop.json b/openpype/settings/defaults/project_settings/photoshop.json index 9fd4fe54f1..47f397663b 100644 --- a/openpype/settings/defaults/project_settings/photoshop.json +++ b/openpype/settings/defaults/project_settings/photoshop.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/resolve.json b/openpype/settings/defaults/project_settings/resolve.json index 3720dc54f4..7379e74200 100644 --- a/openpype/settings/defaults/project_settings/resolve.json +++ b/openpype/settings/defaults/project_settings/resolve.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/traypublisher.json b/openpype/settings/defaults/project_settings/traypublisher.json index 311c5b0cfc..2668b5d638 100644 --- a/openpype/settings/defaults/project_settings/traypublisher.json +++ b/openpype/settings/defaults/project_settings/traypublisher.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/tvpaint.json b/openpype/settings/defaults/project_settings/tvpaint.json index b649d56337..3c930b84eb 100644 --- a/openpype/settings/defaults/project_settings/tvpaint.json +++ b/openpype/settings/defaults/project_settings/tvpaint.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index d83e090fae..d92d3403ed 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/webpublisher.json b/openpype/settings/defaults/project_settings/webpublisher.json index a9dc9012eb..17d61ef028 100644 --- a/openpype/settings/defaults/project_settings/webpublisher.json +++ b/openpype/settings/defaults/project_settings/webpublisher.json @@ -1,12 +1,12 @@ { "imageio": { - "enabled": false, + "activate_host_color_management": true, "ocio_config": { - "enabled": false, + "override_global_config": false, "filepath": [] }, "file_rules": { - "enabled": false, + "override_global_rules": false, "rules": {} } }, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 2d48e06ccb..7bc20fed87 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 2e4dcb4e31..dbba7dfdd2 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index efecb2a89c..ab3acaf4a2 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index 7c839037ad..5b96a49679 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 87856380ac..fad6361119 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -10,12 +10,12 @@ "type": "dict", "label": "Color Management (ImageIO)", "collapsible": true, - "checkbox_key": "enabled", + "is_group": true, "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json index 6f31f4f685..f200c1722f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json @@ -27,8 +27,39 @@ ] }, { - "type": "schema", - "name": "schema_imageio_file_rules" + "key": "file_rules", + "type": "dict", + "label": "File Rules", + "collapsible": true, + "children": [ + { + "key": "rules", + "label": "Rules", + "type": "dict-modifiable", + "highlight_content": true, + "collapsible": false, + "object_type": { + "type": "dict", + "children": [ + { + "key": "pattern", + "label": "Regex pattern", + "type": "text" + }, + { + "key": "colorspace", + "label": "Colorspace name", + "type": "text" + }, + { + "key": "ext", + "label": "File extension", + "type": "text" + } + ] + } + } + ] } ] diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index da80648a14..71f8cb4db2 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index af3ee713c4..5e42cb0a00 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -9,14 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", - "is_group": true, "collapsible": true, - "checkbox_key": "enabled", + "is_group": true, "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 74ffbbe9f4..14217c944e 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index de7b4aca0b..5c4b825872 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 8373a57429..ef32f907ed 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -16,12 +16,11 @@ "label": "Color Management (ImageIO)", "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index 95f402ca7c..53e59956eb 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index da252dd9b1..16de175933 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index 4bce299747..bc80562940 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index b1a31b5c93..a0d94ad7dc 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index b330fd600f..87ba3d2d43 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index d0c2145298..f596c89686 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -9,13 +9,13 @@ "key": "imageio", "type": "dict", "label": "Color Management (ImageIO)", + "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json index e7cff969d3..bc65dd7826 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json @@ -3,12 +3,11 @@ "type": "dict", "label": "OCIO config", "collapsible": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "override_global_config", + "label": "Override global OCIO config" }, { "type": "path", @@ -18,4 +17,4 @@ "multipath": true } ] -} \ No newline at end of file +} diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json index a171ba1c55..e76c8a326f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json @@ -3,12 +3,11 @@ "type": "dict", "label": "File Rules", "collapsible": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" + "key": "override_global_rules", + "label": "Override global file rules" }, { "key": "rules", @@ -38,4 +37,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index a46958e616..a986db1ade 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -4,16 +4,11 @@ "label": "Color Management (ImageIO)", "collapsible": true, "is_group": true, - "checkbox_key": "enabled", "children": [ { "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "label", - "label": "'Custom OCIO config path' has deprecated.
If you need to set custom config, just enable and add path into 'OCIO config'.
Anatomy keys are supported.." + "key": "activate_host_color_management", + "label": "Enable Color Management in host" }, { "type": "schema", @@ -108,19 +103,9 @@ }, { "cg-config-v1.0.0_aces-v1.3_ocio-v2.1": "cg-config-v1.0.0_aces-v1.3_ocio-v2.1 (14)" - }, - { - "custom": "custom" } ] }, - { - "type": "path", - "key": "customOCIOConfigPath", - "label": "Custom OCIO config path", - "multiplatform": true, - "multipath": true - }, { "type": "text", "key": "workingSpaceLUT", From 57e8722d7151e0343f20991dcd48b4a04bca304e Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 12 Apr 2023 17:50:46 +0200 Subject: [PATCH 17/76] redefining switches for imageio host activation and config overrides --- openpype/pipeline/colorspace.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index f1a50281d2..ed5c284faf 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -344,28 +344,31 @@ def get_imageio_config( imageio_global, imageio_host = _get_imageio_settings( project_settings, host_name) - # check if host settings group is having enabled key - imageio_enabled = imageio_host.get("enabled") - if imageio_enabled is None: - # it it does not have enabled key, use global settings - imageio_enabled = True + # check if host settings group is having activate_host_color_management + # it it does not have activation key then use global settings + # this is for backward compatibility + # TODO: in future rewrite this to be more explicit + activate_host_color_management = imageio_host.get( + "activate_host_color_management", True) - if not imageio_enabled : + if not activate_host_color_management: # if host settings are disabled return False because # it is expected that no colorspace management is needed return False config_host = imageio_host.get("ocio_config", {}) - if config_host.get("enabled"): + # get config path from either global or host_name + # depending on override flag + # TODO: in future rewrite this to be more explicit + config_data = None + override_global_rules = config_host.get("override_global_rules") + if override_global_rules: config_data = _get_config_data( config_host["filepath"], formatting_data ) else: - config_data = None - - if not config_data: - # get config path from either global or host_name + # get config path from global config_global = imageio_global["ocio_config"] config_data = _get_config_data( config_global["filepath"], formatting_data From 8f057e79d51b2e21586cb8733cf8aaff5c19f4fb Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 12 Apr 2023 21:26:25 +0200 Subject: [PATCH 18/76] fixing typo --- openpype/pipeline/colorspace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index ed5c284faf..098e2a02c6 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -362,8 +362,8 @@ def get_imageio_config( # depending on override flag # TODO: in future rewrite this to be more explicit config_data = None - override_global_rules = config_host.get("override_global_rules") - if override_global_rules: + override_global_config = config_host.get("override_global_config") + if override_global_config: config_data = _get_config_data( config_host["filepath"], formatting_data ) From 153810b919efae29db4d7afc84562ac20068e5f7 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 12 Apr 2023 21:45:53 +0200 Subject: [PATCH 19/76] adding hosts colorspace management switches into code --- openpype/pipeline/colorspace.py | 21 +++++++++++++------- openpype/pipeline/publish/publish_plugins.py | 15 +++++++++----- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 098e2a02c6..b3774e5e90 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -92,6 +92,11 @@ def get_imageio_colorspace_from_filepath( ) config_data = get_imageio_config( project_name, host_name, project_settings) + + # in case host color management is not enabled + if not config_data: + return None + file_rules = get_imageio_file_rules( project_name, host_name, project_settings) @@ -354,6 +359,10 @@ def get_imageio_config( if not activate_host_color_management: # if host settings are disabled return False because # it is expected that no colorspace management is needed + log.info( + "Colorspace management for host '{}' is disabled.".format( + host_name) + ) return False config_host = imageio_host.get("ocio_config", {}) @@ -456,13 +465,11 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): frules_host = imageio_host.get("file_rules", {}) # compile file rules dictionary - file_rules = {} - if frules_global["enabled"]: - file_rules.update(frules_global["rules"]) - if frules_host and frules_host["enabled"]: - file_rules.update(frules_host["rules"]) - - return file_rules + override_global_rules = frules_host.get("override_global_rules") + if override_global_rules: + return frules_host["rules"] + else: + return frules_global["rules"] def _get_imageio_settings(project_settings, host_name): diff --git a/openpype/pipeline/publish/publish_plugins.py b/openpype/pipeline/publish/publish_plugins.py index 331235fadc..a3f8413979 100644 --- a/openpype/pipeline/publish/publish_plugins.py +++ b/openpype/pipeline/publish/publish_plugins.py @@ -331,6 +331,11 @@ class ColormanagedPyblishPluginMixin(object): project_settings=project_settings_, anatomy_data=anatomy_data ) + + # in case host color management is not enabled + if not config_data: + return None + file_rules = get_imageio_file_rules( project_name, host_name, project_settings=project_settings_ @@ -385,14 +390,14 @@ class ColormanagedPyblishPluginMixin(object): if colorspace_settings is None: colorspace_settings = self.get_colorspace_settings(context) + # in case host color management is not enabled + if not colorspace_settings: + self.log.warning("Host's colorspace management is disabled.") + return + # unpack colorspace settings config_data, file_rules = colorspace_settings - if not config_data: - # warn in case no colorspace path was defined - self.log.warning("No colorspace management was defined") - return - self.log.info("Config data is : `{}`".format( config_data)) From 6ae7b415330778d9588ef8a8bea2e0ca83f51881 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 12 Apr 2023 22:50:32 +0200 Subject: [PATCH 20/76] fixing tests --- .../openpype/pipeline/publish/test_publish_plugins.py | 10 +++++----- tests/unit/openpype/pipeline/test_colorspace.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py index 88e0095e34..bbeab2cc90 100644 --- a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py +++ b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py @@ -26,7 +26,7 @@ log = logging.getLogger(__name__) class TestPipelinePublishPlugins(TestPipeline): - """ Testing Pipeline pubish_plugins.py + """ Testing Pipeline publish_plugins.py Example: cd to OpenPype repo root dir @@ -37,7 +37,7 @@ class TestPipelinePublishPlugins(TestPipeline): # files are the same as those used in `test_pipeline_colorspace` TEST_FILES = [ ( - "1d7t9_cVKeZRVF0ppCHiE5MJTTtTlJgBe", + "1YinxOToVyAd3-jAMFgVf7EWQa2x8Ma-O", "test_pipeline_colorspace.zip", "" ) @@ -140,7 +140,7 @@ class TestPipelinePublishPlugins(TestPipeline): config_data, file_rules = plugin.get_colorspace_settings(context) assert config_data["template"] == expected_config_template, ( - "Returned config tempate is not " + "Returned config template is not " f"matching {expected_config_template}" ) assert file_rules == expected_file_rules, ( @@ -193,11 +193,11 @@ class TestPipelinePublishPlugins(TestPipeline): colorspace_data_hiero = representation_hiero.get("colorspaceData") assert colorspace_data_nuke, ( - "Colorspace data were not created in prepresentation" + "Colorspace data were not created in representation" f"matching {representation_nuke}" ) assert colorspace_data_hiero, ( - "Colorspace data were not created in prepresentation" + "Colorspace data were not created in representation" f"matching {representation_hiero}" ) diff --git a/tests/unit/openpype/pipeline/test_colorspace.py b/tests/unit/openpype/pipeline/test_colorspace.py index d064ca2be4..d0981723ad 100644 --- a/tests/unit/openpype/pipeline/test_colorspace.py +++ b/tests/unit/openpype/pipeline/test_colorspace.py @@ -31,7 +31,7 @@ class TestPipelineColorspace(TestPipeline): TEST_FILES = [ ( - "1d7t9_cVKeZRVF0ppCHiE5MJTTtTlJgBe", + "1YinxOToVyAd3-jAMFgVf7EWQa2x8Ma-O", "test_pipeline_colorspace.zip", "" ) @@ -120,7 +120,7 @@ class TestPipelineColorspace(TestPipeline): ) assert config_data["template"] == expected_template, ( f"Config template \'{config_data['template']}\' doesn't match " - f"expected tempalte \'{expected_template}\'" + f"expected template \'{expected_template}\'" ) def test_parse_colorspace_from_filepath( From b8ee128bc09922c97bedd71780111ab707db1043 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 17 Apr 2023 12:00:31 +0200 Subject: [PATCH 21/76] imageio: adding `use_ocio_config` toggle --- openpype/hooks/pre_ocio_hook.py | 21 +++++++++++++++-- openpype/pipeline/colorspace.py | 23 +++++++++++++++++++ .../project_settings/aftereffects.json | 1 + .../defaults/project_settings/blender.json | 1 + .../defaults/project_settings/fusion.json | 1 + .../defaults/project_settings/hiero.json | 1 + .../defaults/project_settings/houdini.json | 1 + .../defaults/project_settings/max.json | 1 + .../defaults/project_settings/maya.json | 1 + .../defaults/project_settings/nuke.json | 1 + .../defaults/project_settings/unreal.json | 1 + .../schema_project_aftereffects.json | 5 ++++ .../schema_project_blender.json | 5 ++++ .../schema_project_fusion.json | 5 ++++ .../projects_schema/schema_project_hiero.json | 5 ++++ .../schema_project_houdini.json | 5 ++++ .../projects_schema/schema_project_max.json | 5 ++++ .../projects_schema/schema_project_maya.json | 5 ++++ .../schema_project_unreal.json | 5 ++++ .../schemas/schema_nuke_imageio.json | 5 ++++ 20 files changed, 96 insertions(+), 2 deletions(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index f51e9f48d8..9038d57e9e 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -1,6 +1,9 @@ from openpype.lib import PreLaunchHook -from openpype.pipeline.colorspace import get_imageio_config +from openpype.pipeline.colorspace import ( + get_imageio_config, + is_host_use_ocio_config_activated +) from openpype.pipeline.template_data import get_template_data_with_names @@ -14,7 +17,12 @@ class OCIOEnvHook(PreLaunchHook): "aftereffects", "3dsmax", "houdini", - "maya" + "maya", + "nuke", + "nukex", + "nukeassist", + "nukestudio", + "hiero" ] def execute(self): @@ -37,6 +45,15 @@ class OCIOEnvHook(PreLaunchHook): ) if config_data: + use_config_path = is_host_use_ocio_config_activated( + project_name=self.data["project_name"], + host_name=self.host_name, + host_name=self.data["project_settings"] + ) + if not use_config_path: + self.log.info("Using of OCIO config path was not activated...") + return + ocio_path = config_data["path"] self.log.info(f"Setting OCIO config path: {ocio_path}") diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index b3774e5e90..5520dab627 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -392,6 +392,29 @@ def get_imageio_config( return config_data +def is_host_use_ocio_config_activated( + project_name, host_name, project_settings=None +): + """Check if host OCIO config path is activated + + Args: + project_name (str): project name + host_name (str): host name + + Returns: + bool: True if activated + """ + project_settings = project_settings or get_project_settings(project_name) + + # get colorspace settings + _, imageio_host = _get_imageio_settings( + project_settings, host_name) + + # check if host settings is having use_ocio_config + if imageio_host.get("use_ocio_config", False): + return True + + def _get_config_data(path_list, anatomy_data): """Return first existing path in path list. diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index 74bd519bbd..5b6dffe67e 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index 8328ceeda3..f1a3286488 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index fa44bbe3d4..ede907e415 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index b7d5d9af23..e2b5933b6d 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 2b7192ff99..fca782b2b8 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index f6462c3d9a..a9625cc539 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index fa3a7bc648..60d5b5ad67 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -2,6 +2,7 @@ "open_workfile_post_initialization": false, "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 1dd0e5128a..cea458d289 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -10,6 +10,7 @@ }, "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index d92d3403ed..60471f28c9 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -1,6 +1,7 @@ { "imageio": { "activate_host_color_management": true, + "use_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 7bc20fed87..35371f3505 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index dbba7dfdd2..793ac5e908 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index fad6361119..b088f3f034 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index 5e42cb0a00..d09a9efa25 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 14217c944e..24e741ff66 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 5c4b825872..aa336d0791 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index ef32f907ed..534afe2e12 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -22,6 +22,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 87ba3d2d43..bfcb4d7fe6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -17,6 +17,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index a986db1ade..1122eb1949 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -10,6 +10,11 @@ "key": "activate_host_color_management", "label": "Enable Color Management in host" }, + { + "type": "boolean", + "key": "use_ocio_config", + "label": "Use OCIO config file in host" + }, { "type": "schema", "name": "schema_imageio_config" From 4148788761dc0c966bd83af00cbb2cd1e235d79a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 17 Apr 2023 12:16:37 +0200 Subject: [PATCH 22/76] removing obsolete settings all of those settings were now driven form global hook`pre_ocio_hook.py` which is activating OCIO environment variable --- .../defaults/project_settings/hiero.json | 5 ---- .../defaults/project_settings/maya.json | 10 -------- .../schema_project_fusion.json | 25 ------------------- .../projects_schema/schema_project_hiero.json | 14 ----------- .../projects_schema/schema_project_maya.json | 22 ---------------- 5 files changed, 76 deletions(-) diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index e2b5933b6d..a1ca0e8933 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -12,11 +12,6 @@ }, "workfile": { "ocioConfigName": "nuke-default", - "ocioconfigpath": { - "windows": [], - "darwin": [], - "linux": [] - }, "workingSpace": "linear", "sixteenBitLut": "sRGB", "eightBitLut": "sRGB", diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 60d5b5ad67..b33636a446 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -13,21 +13,11 @@ }, "colorManagementPreference_v2": { "enabled": true, - "configFilePath": { - "windows": [], - "darwin": [], - "linux": [] - }, "renderSpace": "ACEScg", "displayName": "sRGB", "viewName": "ACES 1.0 SDR-video" }, "colorManagementPreference": { - "configFilePath": { - "windows": [], - "darwin": [], - "linux": [] - }, "renderSpace": "scene-linear Rec 709/sRGB", "viewTransform": "sRGB gamma" } diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index b088f3f034..d488c9f551 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -29,31 +29,6 @@ { "type": "schema", "name": "schema_imageio_file_rules" - }, - { - "key": "ocio", - "type": "dict", - "label": "OpenColorIO (OCIO)", - "collapsible": true, - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Set OCIO variable for Fusion" - }, - { - "type": "label", - "label": "'configFilePath' will be deprecated.
Please move values to : project_settings/{app}/imageio/ocio_config/filepath." - }, - { - "type": "path", - "key": "configFilePath", - "label": "OCIO Config File Path", - "multiplatform": true, - "multipath": true - } - ] } ] }, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index d09a9efa25..0bd88c6e11 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -36,10 +36,6 @@ "label": "Workfile", "collapsible": false, "children": [ - { - "type": "label", - "label": "'ocioconfigpath' will be deprecated.
Please move values to : project_settings/{app}/imageio/ocio_config/filepath." - }, { "type": "form", "children": [ @@ -65,19 +61,9 @@ }, { "cg-config-v1.0.0_aces-v1.3_ocio-v2.1": "cg-config-v1.0.0_aces-v1.3_ocio-v2.1 (14)" - }, - { - "custom": "custom" } ] }, - { - "type": "path", - "key": "ocioconfigpath", - "label": "Custom OCIO path", - "multiplatform": true, - "multipath": true - }, { "type": "text", "key": "workingSpace", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 534afe2e12..cb2292319a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -47,17 +47,6 @@ "key": "enabled", "label": "Use Color Management Preference v2" }, - { - "type": "label", - "label": "'configFilePath' will be deprecated.
Please move values to : project_settings/{app}/imageio/ocio_config/filepath." - }, - { - "type": "path", - "key": "configFilePath", - "label": "OCIO Config File Path", - "multiplatform": true, - "multipath": true - }, { "type": "text", "key": "renderSpace", @@ -81,17 +70,6 @@ "label": "Color Management Preference (legacy)", "collapsible": true, "children": [ - { - "type": "label", - "label": "'configFilePath' will be deprecated.
Please move values to : project_settings/{app}/imageio/ocio_config/filepath." - }, - { - "type": "path", - "key": "configFilePath", - "label": "OCIO Config File Path", - "multiplatform": true, - "multipath": true - }, { "type": "text", "key": "renderSpace", From 5a39139aaa0321bea3635cc8d8b9ef144af87282 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 17 Apr 2023 12:27:27 +0200 Subject: [PATCH 23/76] fix duplicated keyword input --- openpype/hooks/pre_ocio_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index 9038d57e9e..d65433fba6 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -48,7 +48,7 @@ class OCIOEnvHook(PreLaunchHook): use_config_path = is_host_use_ocio_config_activated( project_name=self.data["project_name"], host_name=self.host_name, - host_name=self.data["project_settings"] + project_settings=self.data["project_settings"] ) if not use_config_path: self.log.info("Using of OCIO config path was not activated...") From 30d0b35c9a80960ee3f620c521c96fc729982d58 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 17 Apr 2023 12:28:02 +0200 Subject: [PATCH 24/76] removing obsolete code in nuke host since we are using OCIO env var there is no need to set this per attribute --- openpype/hosts/nuke/api/lib.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 71643a2fd0..57c3207463 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -2013,18 +2013,6 @@ class WorkfileSettings(object): ''' workfile_settings = imageio_host["workfile"] - # get config data if imageio is enabled - config_data = None - if imageio_host.get("enabled"): - # switch ocio config to custom config - workfile_settings["OCIO_config"] = "custom" - workfile_settings["colorManagement"] = "OCIO" - - # get resolved ocio config path - config_data = get_imageio_config( - legacy_io.active_project(), "nuke" - ) - # first set OCIO if self._root_node["colorManagement"].value() \ not in str(workfile_settings["colorManagement"]): @@ -2034,6 +2022,7 @@ class WorkfileSettings(object): # we dont need the key anymore workfile_settings.pop("colorManagement") + # second set ocio version if self._root_node["OCIO_config"].value() \ not in str(workfile_settings["OCIO_config"]): @@ -2043,14 +2032,6 @@ class WorkfileSettings(object): # we dont need the key anymore workfile_settings.pop("OCIO_config") - # third set ocio custom path - if config_data: - self._root_node["customOCIOConfigPath"].setValue( - str(config_data["path"]).replace("\\", "/") - ) - # backward compatibility, remove in case it exists - workfile_settings.pop("customOCIOConfigPath") - # then set the rest for knob, value in workfile_settings.items(): # skip unfilled ocio config path From 23105fcf9052804dcbfa034b63301faf8d6c884e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Thu, 20 Apr 2023 22:00:41 +0200 Subject: [PATCH 25/76] Update openpype/pipeline/colorspace.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fabià Serra Arrizabalaga --- openpype/pipeline/colorspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 5520dab627..ceb4572b38 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -350,7 +350,7 @@ def get_imageio_config( project_settings, host_name) # check if host settings group is having activate_host_color_management - # it it does not have activation key then use global settings + # it it does not have activation key then default it to True so it uses global settings # this is for backward compatibility # TODO: in future rewrite this to be more explicit activate_host_color_management = imageio_host.get( From 3793830b3db1d340f4e594ea34b8209d383067ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Thu, 20 Apr 2023 22:05:50 +0200 Subject: [PATCH 26/76] Update openpype/pipeline/colorspace.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fabià Serra Arrizabalaga --- openpype/pipeline/colorspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index ceb4572b38..5dd7f01009 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -411,7 +411,7 @@ def is_host_use_ocio_config_activated( project_settings, host_name) # check if host settings is having use_ocio_config - if imageio_host.get("use_ocio_config", False): + return imageio_host.get("use_ocio_config", False) return True From b66aaf2bdff6bd8ee013ecf9d96b63fbdb9f573c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 20 Apr 2023 22:09:48 +0200 Subject: [PATCH 27/76] keep consistency in returning types --- openpype/pipeline/colorspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index ceb4572b38..29794aa7aa 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -363,7 +363,7 @@ def get_imageio_config( "Colorspace management for host '{}' is disabled.".format( host_name) ) - return False + return {} config_host = imageio_host.get("ocio_config", {}) From 92c148a42e2f3dfb4c67edbd8d2e387b1cd2fe72 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 20 Apr 2023 22:22:33 +0200 Subject: [PATCH 28/76] hound --- openpype/pipeline/colorspace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index eecaa64705..e8d88bf533 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -350,7 +350,8 @@ def get_imageio_config( project_settings, host_name) # check if host settings group is having activate_host_color_management - # it it does not have activation key then default it to True so it uses global settings + # it it does not have activation key then default it to True so it uses + # global settings # this is for backward compatibility # TODO: in future rewrite this to be more explicit activate_host_color_management = imageio_host.get( @@ -412,7 +413,6 @@ def is_host_use_ocio_config_activated( # check if host settings is having use_ocio_config return imageio_host.get("use_ocio_config", False) - return True def _get_config_data(path_list, anatomy_data): From 35c1e4cd89d6694d729cb11604ed1c21e5c44f3c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 10:58:18 +0200 Subject: [PATCH 29/76] Converting `app_groups` to `hosts` --- openpype/hooks/pre_ocio_hook.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index d65433fba6..7c67be5cfe 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -11,7 +11,7 @@ class OCIOEnvHook(PreLaunchHook): """Set OCIO environment variable for hosts that use OpenColorIO.""" order = 0 - app_groups = [ + hosts = [ "fusion", "blender", "aftereffects", @@ -19,9 +19,6 @@ class OCIOEnvHook(PreLaunchHook): "houdini", "maya", "nuke", - "nukex", - "nukeassist", - "nukestudio", "hiero" ] From 63af34e9ab76e1e1ccc15067c188bb1648fd279e Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 11:52:34 +0200 Subject: [PATCH 30/76] rename `use_ocio_config` to `set_ocio_config` --- openpype/hooks/pre_ocio_hook.py | 4 ++-- openpype/pipeline/colorspace.py | 6 +++--- .../settings/defaults/project_settings/aftereffects.json | 2 +- openpype/settings/defaults/project_settings/blender.json | 2 +- openpype/settings/defaults/project_settings/fusion.json | 2 +- openpype/settings/defaults/project_settings/hiero.json | 2 +- openpype/settings/defaults/project_settings/houdini.json | 2 +- openpype/settings/defaults/project_settings/max.json | 2 +- openpype/settings/defaults/project_settings/maya.json | 2 +- openpype/settings/defaults/project_settings/nuke.json | 2 +- openpype/settings/defaults/project_settings/unreal.json | 2 +- .../projects_schema/schema_project_aftereffects.json | 2 +- .../schemas/projects_schema/schema_project_blender.json | 2 +- .../schemas/projects_schema/schema_project_fusion.json | 2 +- .../schemas/projects_schema/schema_project_hiero.json | 2 +- .../schemas/projects_schema/schema_project_houdini.json | 2 +- .../schemas/projects_schema/schema_project_max.json | 2 +- .../schemas/projects_schema/schema_project_maya.json | 2 +- .../schemas/projects_schema/schema_project_unreal.json | 2 +- .../projects_schema/schemas/schema_nuke_imageio.json | 2 +- 20 files changed, 23 insertions(+), 23 deletions(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index 7c67be5cfe..e09460db14 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -2,7 +2,7 @@ from openpype.lib import PreLaunchHook from openpype.pipeline.colorspace import ( get_imageio_config, - is_host_use_ocio_config_activated + is_set_ocio_config_activated ) from openpype.pipeline.template_data import get_template_data_with_names @@ -42,7 +42,7 @@ class OCIOEnvHook(PreLaunchHook): ) if config_data: - use_config_path = is_host_use_ocio_config_activated( + use_config_path = is_set_ocio_config_activated( project_name=self.data["project_name"], host_name=self.host_name, project_settings=self.data["project_settings"] diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index e8d88bf533..a1714bc75e 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -393,7 +393,7 @@ def get_imageio_config( return config_data -def is_host_use_ocio_config_activated( +def is_set_ocio_config_activated( project_name, host_name, project_settings=None ): """Check if host OCIO config path is activated @@ -411,8 +411,8 @@ def is_host_use_ocio_config_activated( _, imageio_host = _get_imageio_settings( project_settings, host_name) - # check if host settings is having use_ocio_config - return imageio_host.get("use_ocio_config", False) + # check if host settings is having set_ocio_config + return imageio_host.get("set_ocio_config", False) def _get_config_data(path_list, anatomy_data): diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index 5b6dffe67e..c30356335b 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index f1a3286488..1969cd8346 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index ede907e415..c80936d402 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index a1ca0e8933..e876d1727d 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index fca782b2b8..dd3fc87b80 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index a9625cc539..89ba7a702d 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 9b86a04bd9..d50441d961 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -411,7 +411,7 @@ }, "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 0f7c5fdaef..119a240ad5 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -10,7 +10,7 @@ }, "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index 60471f28c9..71c3498f1e 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -1,7 +1,7 @@ { "imageio": { "activate_host_color_management": true, - "use_ocio_config": false, + "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 35371f3505..777d185275 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 793ac5e908..8872cd123e 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index d488c9f551..41f464589c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index 0bd88c6e11..55d29e8b07 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 24e741ff66..4782295006 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index aa336d0791..d57f603641 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index ef6e3f9171..a99b650401 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -59,7 +59,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index bfcb4d7fe6..d5c58e6a5d 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -19,7 +19,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 1122eb1949..4bc741703a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -12,7 +12,7 @@ }, { "type": "boolean", - "key": "use_ocio_config", + "key": "set_ocio_config", "label": "Use OCIO config file in host" }, { From bae3ca9a3be102c926fda14eaa497e3b49ec63ea Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 11:57:22 +0200 Subject: [PATCH 31/76] change label to reflect attribute name --- .../schemas/projects_schema/schema_project_aftereffects.json | 2 +- .../schemas/projects_schema/schema_project_blender.json | 2 +- .../entities/schemas/projects_schema/schema_project_fusion.json | 2 +- .../entities/schemas/projects_schema/schema_project_hiero.json | 2 +- .../schemas/projects_schema/schema_project_houdini.json | 2 +- .../entities/schemas/projects_schema/schema_project_max.json | 2 +- .../entities/schemas/projects_schema/schema_project_maya.json | 2 +- .../entities/schemas/projects_schema/schema_project_unreal.json | 2 +- .../schemas/projects_schema/schemas/schema_nuke_imageio.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 777d185275..148c1840e5 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 8872cd123e..fe6ee94654 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 41f464589c..f97a3a3a40 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index 55d29e8b07..a46611dc8b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 4782295006..d254b92269 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index d57f603641..1141cefb40 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index a99b650401..37f864a71c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -60,7 +60,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index d5c58e6a5d..4ff4bddc47 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -20,7 +20,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 4bc741703a..c69a4c4f4b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -13,7 +13,7 @@ { "type": "boolean", "key": "set_ocio_config", - "label": "Use OCIO config file in host" + "label": "Set OCIO config file in host" }, { "type": "schema", From a31e90c53255d4cd84983218f4647aa50ae14649 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 15:41:38 +0200 Subject: [PATCH 32/76] renaming variable according to attribute --- openpype/hooks/pre_ocio_hook.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index e09460db14..bcff31fc93 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -42,16 +42,21 @@ class OCIOEnvHook(PreLaunchHook): ) if config_data: - use_config_path = is_set_ocio_config_activated( + set_config_path = is_set_ocio_config_activated( project_name=self.data["project_name"], host_name=self.host_name, project_settings=self.data["project_settings"] ) - if not use_config_path: - self.log.info("Using of OCIO config path was not activated...") + if not set_config_path: + self.log.info( + "Setting of OCIO environment with " + "config path was not activated..." + ) return ocio_path = config_data["path"] - self.log.info(f"Setting OCIO config path: {ocio_path}") + self.log.info( + f"Setting OCIO environment to config path: {ocio_path}") + self.launch_context.env["OCIO"] = ocio_path From 3fe4710b2115a5618ec898c94587f52d5522dbf6 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 15:42:19 +0200 Subject: [PATCH 33/76] Maya: refactor colorspace preferecies with new settings --- openpype/hosts/maya/api/lib.py | 147 ++++++++---------- .../defaults/project_settings/maya.json | 14 +- .../projects_schema/schema_project_maya.json | 61 ++++++-- 3 files changed, 127 insertions(+), 95 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 61ea3d59df..58537db5f0 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -1,6 +1,7 @@ """Standalone helper functions""" import os +from pprint import pformat import sys import platform import uuid @@ -3177,75 +3178,6 @@ def iter_shader_edits(relationships, shader_nodes, nodes_by_id, label=None): def set_colorspace(): """Set Colorspace from project configuration """ - project_name = os.getenv("AVALON_PROJECT") - imageio = get_project_settings(project_name)["maya"]["imageio"] - - # Maya 2022+ introduces new OCIO v2 color management settings that - # can override the old color managenement preferences. OpenPype has - # separate settings for both so we fall back when necessary. - use_ocio_v2 = imageio["colorManagementPreference_v2"]["enabled"] - required_maya_version = 2022 - maya_version = int(cmds.about(version=True)) - maya_supports_ocio_v2 = maya_version >= required_maya_version - if use_ocio_v2 and not maya_supports_ocio_v2: - # Fallback to legacy behavior with a warning - log.warning("Color Management Preference v2 is enabled but not " - "supported by current Maya version: {} (< {}). Falling " - "back to legacy settings.".format( - maya_version, required_maya_version) - ) - use_ocio_v2 = False - - if use_ocio_v2: - root_dict = imageio["colorManagementPreference_v2"] - else: - root_dict = imageio["colorManagementPreference"] - - if not isinstance(root_dict, dict): - msg = "set_colorspace(): argument should be dictionary" - log.error(msg) - - log.debug(">> root_dict: {}".format(root_dict)) - - # enable color management - cmds.colorManagementPrefs(e=True, cmEnabled=True) - cmds.colorManagementPrefs(e=True, ocioRulesEnabled=True) - - # set config path - custom_ocio_config = False - if root_dict.get("configFilePath"): - unresolved_path = root_dict["configFilePath"] - ocio_paths = unresolved_path[platform.system().lower()] - - resolved_path = None - for ocio_p in ocio_paths: - resolved_path = str(ocio_p).format(**os.environ) - if not os.path.exists(resolved_path): - continue - - if resolved_path: - filepath = str(resolved_path).replace("\\", "/") - cmds.colorManagementPrefs(e=True, configFilePath=filepath) - cmds.colorManagementPrefs(e=True, cmConfigFileEnabled=True) - log.debug("maya '{}' changed to: {}".format( - "configFilePath", resolved_path)) - custom_ocio_config = True - else: - cmds.colorManagementPrefs(e=True, cmConfigFileEnabled=False) - cmds.colorManagementPrefs(e=True, configFilePath="") - - # If no custom OCIO config file was set we make sure that Maya 2022+ - # either chooses between Maya's newer default v2 or legacy config based - # on OpenPype setting to use ocio v2 or not. - if maya_supports_ocio_v2 and not custom_ocio_config: - if use_ocio_v2: - # Use Maya 2022+ default OCIO v2 config - log.info("Setting default Maya OCIO v2 config") - cmds.colorManagementPrefs(edit=True, configFilePath="") - else: - # Set the Maya default config file path - log.info("Setting default Maya OCIO v1 legacy config") - cmds.colorManagementPrefs(edit=True, configFilePath="legacy") # set color spaces for rendering space and view transforms def _colormanage(**kwargs): @@ -3262,17 +3194,74 @@ def set_colorspace(): except RuntimeError as exc: log.error(exc) - if use_ocio_v2: - _colormanage(renderingSpaceName=root_dict["renderSpace"]) - _colormanage(displayName=root_dict["displayName"]) - _colormanage(viewName=root_dict["viewName"]) - else: - _colormanage(renderingSpaceName=root_dict["renderSpace"]) - if maya_supports_ocio_v2: - _colormanage(viewName=root_dict["viewTransform"]) - _colormanage(displayName="legacy") + project_name = os.getenv("AVALON_PROJECT") + imageio = get_project_settings(project_name)["maya"]["imageio"] + + # ocio compatibility variables + ocio_v2_maya_version = 2022 + maya_version = int(cmds.about(version=True)) + ocio_v2_support = use_ocio_v2 = maya_version >= ocio_v2_maya_version + + root_dict = {} + use_workfile_settings = imageio.get("workfile", {}).get("enabled") + + if use_workfile_settings: + # TODO: deprecated code from 3.15.5 - remove + # Maya 2022+ introduces new OCIO v2 color management settings that + # can override the old color management preferences. OpenPype has + # separate settings for both so we fall back when necessary. + use_ocio_v2 = imageio["colorManagementPreference_v2"]["enabled"] + if use_ocio_v2 and not ocio_v2_support: + # Fallback to legacy behavior with a warning + log.warning( + "Color Management Preference v2 is enabled but not " + "supported by current Maya version: {} (< {}). Falling " + "back to legacy settings.".format( + maya_version, ocio_v2_maya_version) + ) + + if use_ocio_v2: + root_dict = imageio["colorManagementPreference_v2"] else: - _colormanage(viewTransformName=root_dict["viewTransform"]) + root_dict = imageio["colorManagementPreference"] + + if not isinstance(root_dict, dict): + msg = "set_colorspace(): argument should be dictionary" + log.error(msg) + + else: + root_dict = imageio["workfile"] + + log.debug(">> root_dict: {}".format(pformat(root_dict))) + + if root_dict: + # enable color management + cmds.colorManagementPrefs(e=True, cmEnabled=True) + cmds.colorManagementPrefs(e=True, ocioRulesEnabled=True) + + # backward compatibility + # TODO: deprecated code from 3.15.5 - refactor to use new settings + view_name = root_dict.get("viewTransform") + if view_name is None: + view_name = root_dict.get("viewName") + + if use_ocio_v2: + # Use Maya 2022+ default OCIO v2 config + log.info("Setting default Maya OCIO v2 config") + cmds.colorManagementPrefs(edit=True, configFilePath="") + + # set rendering space and view transform + _colormanage(renderingSpaceName=root_dict["renderSpace"]) + _colormanage(viewName=view_name) + _colormanage(displayName=root_dict["displayName"]) + else: + # Set the Maya default config file path + log.info("Setting default Maya OCIO v1 legacy config") + cmds.colorManagementPrefs(edit=True, configFilePath="legacy") + + # set rendering space and view transform + _colormanage(renderingSpaceName=root_dict["renderSpace"]) + _colormanage(viewTransformName=view_name) @contextlib.contextmanager diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index d50441d961..b09ed146bf 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -420,6 +420,12 @@ "override_global_rules": false, "rules": {} }, + "workfile": { + "enabled": false, + "renderSpace": "ACEScg", + "displayName": "sRGB", + "viewName": "ACES 1.0 SDR-video" + }, "colorManagementPreference_v2": { "enabled": true, "renderSpace": "ACEScg", @@ -448,6 +454,10 @@ "destination-path": [] } }, + "include_handles": { + "include_handles_default": false, + "per_task_type": [] + }, "scriptsmenu": { "name": "OpenPype Tools", "definition": [ @@ -1546,10 +1556,6 @@ } ] }, - "include_handles": { - "include_handles_default": false, - "per_task_type": [] - }, "templated_workfile_build": { "profiles": [] }, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 37f864a71c..b5366bb0a7 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -71,16 +71,16 @@ "name": "schema_imageio_file_rules" }, { - "key": "colorManagementPreference_v2", + "key": "workfile", "type": "dict", - "label": "Color Management Preference v2 (Maya 2022+)", + "label": "Workfile", "collapsible": true, "checkbox_key": "enabled", "children": [ { "type": "boolean", "key": "enabled", - "label": "Use Color Management Preference v2" + "label": "Enabled" }, { "type": "text", @@ -100,20 +100,57 @@ ] }, { - "key": "colorManagementPreference", - "type": "dict", - "label": "Color Management Preference (legacy)", + "type": "collapsible-wrap", + "label": "[Deprecated] please migrate all to 'Workfile' and enable it.", "collapsible": true, + "collapsed": true, "children": [ { - "type": "text", - "key": "renderSpace", - "label": "Rendering Space" + "key": "colorManagementPreference_v2", + "type": "dict", + "label": "[DEPRECATED] Color Management Preference v2 (Maya 2022+)", + "collapsible": true, + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Use Color Management Preference v2" + }, + { + "type": "text", + "key": "renderSpace", + "label": "Rendering Space" + }, + { + "type": "text", + "key": "displayName", + "label": "Display" + }, + { + "type": "text", + "key": "viewName", + "label": "View" + } + ] }, { - "type": "text", - "key": "viewTransform", - "label": "Viewer Transform" + "key": "colorManagementPreference", + "type": "dict", + "label": "[DEPRECATED] Color Management Preference (legacy)", + "collapsible": true, + "children": [ + { + "type": "text", + "key": "renderSpace", + "label": "Rendering Space" + }, + { + "type": "text", + "key": "viewTransform", + "label": "Viewer Transform (workfile/viewName)" + } + ] } ] } From 7aaa5f767c196bb9b95e3225e0347e84f11660f7 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Apr 2023 15:42:51 +0200 Subject: [PATCH 34/76] removing old settings --- openpype/settings/defaults/project_settings/fusion.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index c80936d402..ba2abd467f 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -9,14 +9,6 @@ "file_rules": { "override_global_rules": false, "rules": {} - }, - "ocio": { - "enabled": false, - "configFilePath": { - "windows": [], - "darwin": [], - "linux": [] - } } }, "copy_fusion_settings": { From 8e456f3f03ed2c976d2e959613b572a1360cbed3 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:19:25 +0200 Subject: [PATCH 35/76] changing structure of colorspace schemas - removing `set_ocio_config` - removing (imageio) from category label - adding global switch to colorspace management - File rules label with ocio v1 compatibility --- .../schema_project_aftereffects.json | 9 ++------- .../projects_schema/schema_project_blender.json | 9 ++------- .../projects_schema/schema_project_celaction.json | 4 ++-- .../projects_schema/schema_project_flame.json | 6 +++--- .../projects_schema/schema_project_fusion.json | 9 ++------- .../projects_schema/schema_project_global.json | 14 ++++++++++++-- .../projects_schema/schema_project_harmony.json | 4 ++-- .../projects_schema/schema_project_hiero.json | 9 ++------- .../projects_schema/schema_project_houdini.json | 9 ++------- .../projects_schema/schema_project_max.json | 9 ++------- .../projects_schema/schema_project_maya.json | 9 ++------- .../projects_schema/schema_project_photoshop.json | 4 ++-- .../projects_schema/schema_project_resolve.json | 4 ++-- .../schema_project_traypublisher.json | 4 ++-- .../projects_schema/schema_project_tvpaint.json | 4 ++-- .../projects_schema/schema_project_unreal.json | 9 ++------- .../schema_project_webpublisher.json | 4 ++-- .../schemas/schema_imageio_file_rules.json | 4 ++-- .../schemas/schema_nuke_imageio.json | 9 ++------- 19 files changed, 49 insertions(+), 84 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 148c1840e5..d9007d6185 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index fe6ee94654..8997b750ec 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index ab3acaf4a2..23268d0d9a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index 5b96a49679..f18da95065 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", @@ -368,7 +368,7 @@ }, { "key": "colorspace_out", - "label": "Output color (imageio)", + "label": "Output color", "type": "text", "default": "linear" }, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index f97a3a3a40..b236925c1c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json index f200c1722f..80ea73267b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json @@ -8,9 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "is_group": true, "children": [ + { + "type": "boolean", + "key": "activate_global_color_management", + "label": "Enable Color Management" + }, { "key": "ocio_config", "type": "dict", @@ -29,9 +34,14 @@ { "key": "file_rules", "type": "dict", - "label": "File Rules", + "label": "File Rules (OCIO v1 only)", "collapsible": true, "children": [ + { + "type": "boolean", + "key": "activate_global_file_rules", + "label": "Enable File Rules" + }, { "key": "rules", "label": "Rules", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 71f8cb4db2..840f1fa4c0 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index a46611dc8b..e7bd91dcef 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index d254b92269..1fb23759cb 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 1141cefb40..bc632d4a20 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index b5366bb0a7..c69ccb3f07 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -48,19 +48,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index 4431e3d95f..c4bb81e7f8 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index 16de175933..ef1880af67 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index d3faf54ae1..a07c262375 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index a0d94ad7dc..1c1d75c4e6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 2dedadc6dd..10f562508a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -8,19 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index f596c89686..bb4287d4b4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -8,14 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" + "label": "Enable Color Management" }, { "type": "schema", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json index e76c8a326f..62b72c2518 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json @@ -1,13 +1,13 @@ { "key": "file_rules", "type": "dict", - "label": "File Rules", + "label": "File Rules (OCIO v1 only)", "collapsible": true, "children": [ { "type": "boolean", "key": "override_global_rules", - "label": "Override global file rules" + "label": "Override global File Rules" }, { "key": "rules", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index c69a4c4f4b..9eed442f25 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -1,19 +1,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management", "collapsible": true, "is_group": true, "children": [ { "type": "boolean", "key": "activate_host_color_management", - "label": "Enable Color Management in host" - }, - { - "type": "boolean", - "key": "set_ocio_config", - "label": "Set OCIO config file in host" + "label": "Enable Color Management" }, { "type": "schema", From bec1dd775d7be9b0d0051b2654288106ce527d6f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:20:39 +0200 Subject: [PATCH 36/76] adding default settings --- .../settings/defaults/project_settings/aftereffects.json | 1 - openpype/settings/defaults/project_settings/blender.json | 1 - openpype/settings/defaults/project_settings/fusion.json | 1 - openpype/settings/defaults/project_settings/global.json | 6 +++++- openpype/settings/defaults/project_settings/hiero.json | 1 - openpype/settings/defaults/project_settings/houdini.json | 1 - openpype/settings/defaults/project_settings/max.json | 5 ++--- openpype/settings/defaults/project_settings/maya.json | 1 - openpype/settings/defaults/project_settings/nuke.json | 5 ++--- openpype/settings/defaults/project_settings/unreal.json | 1 - 10 files changed, 9 insertions(+), 14 deletions(-) diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index c30356335b..74bd519bbd 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index 1969cd8346..8328ceeda3 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index ba2abd467f..a506f0c182 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index 3b7b29fe8b..dcc0fdb6b2 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -1,5 +1,6 @@ { "imageio": { + "activate_global_color_management": false, "ocio_config": { "filepath": [ "{OPENPYPE_ROOT}/vendor/bin/ocioconfig/OpenColorIOConfigs/aces_1.2/config.ocio", @@ -7,6 +8,7 @@ ] }, "file_rules": { + "activate_global_file_rules": false, "rules": { "example": { "pattern": ".*(beauty).*", @@ -250,7 +252,9 @@ } }, { - "families": ["review"], + "families": [ + "review" + ], "hosts": [ "maya", "houdini" diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index e876d1727d..01eb15bfbc 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index dd3fc87b80..2b7192ff99 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index 89ba7a702d..e69b64f6cf 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] @@ -17,8 +16,8 @@ "image_format": "exr", "multipass": true }, - "PointCloud":{ - "attribute":{ + "PointCloud": { + "attribute": { "Age": "age", "Radius": "radius", "Position": "position", diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index c1ec473654..a31dffe4c2 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -411,7 +411,6 @@ }, "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 119a240ad5..a1e2e5c15b 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -10,7 +10,6 @@ }, "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] @@ -355,12 +354,12 @@ "optional": true, "active": true }, - "ValidateGizmo": { + "ValidateBackdrop": { "enabled": true, "optional": true, "active": true }, - "ValidateBackdrop": { + "ValidateGizmo": { "enabled": true, "optional": true, "active": true diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index eace5a3542..72acf17b9e 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -1,7 +1,6 @@ { "imageio": { "activate_host_color_management": true, - "set_ocio_config": false, "ocio_config": { "override_global_config": false, "filepath": [] From c129a7885170ce395e2399e9ce598aae72b5ba12 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:32:28 +0200 Subject: [PATCH 37/76] remove set_ocio_config from global hook also clear the checking function from colorspace.py --- openpype/hooks/pre_ocio_hook.py | 15 +-------------- openpype/pipeline/colorspace.py | 22 ---------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index bcff31fc93..49a042caa8 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -1,8 +1,7 @@ from openpype.lib import PreLaunchHook from openpype.pipeline.colorspace import ( - get_imageio_config, - is_set_ocio_config_activated + get_imageio_config ) from openpype.pipeline.template_data import get_template_data_with_names @@ -42,18 +41,6 @@ class OCIOEnvHook(PreLaunchHook): ) if config_data: - set_config_path = is_set_ocio_config_activated( - project_name=self.data["project_name"], - host_name=self.host_name, - project_settings=self.data["project_settings"] - ) - if not set_config_path: - self.log.info( - "Setting of OCIO environment with " - "config path was not activated..." - ) - return - ocio_path = config_data["path"] self.log.info( diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index a1714bc75e..627d93153c 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -393,28 +393,6 @@ def get_imageio_config( return config_data -def is_set_ocio_config_activated( - project_name, host_name, project_settings=None -): - """Check if host OCIO config path is activated - - Args: - project_name (str): project name - host_name (str): host name - - Returns: - bool: True if activated - """ - project_settings = project_settings or get_project_settings(project_name) - - # get colorspace settings - _, imageio_host = _get_imageio_settings( - project_settings, host_name) - - # check if host settings is having set_ocio_config - return imageio_host.get("set_ocio_config", False) - - def _get_config_data(path_list, anatomy_data): """Return first existing path in path list. From e290d70584c085c0b968ae27687044060e103e52 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:33:48 +0200 Subject: [PATCH 38/76] recognize global colorspace management switch --- openpype/pipeline/colorspace.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 627d93153c..ec793cd48b 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -346,11 +346,26 @@ def get_imageio_config( formatting_data["platform"] = platform.system().lower() # get colorspace settings + # check if global settings group is having activate_global_color_management + # key at all. If it does't then default it to False + # this is for backward compatibility only + # TODO: in future rewrite this to be more explicit imageio_global, imageio_host = _get_imageio_settings( project_settings, host_name) + activate_color_management = imageio_global.get( + "activate_global_color_management", False) + + if not activate_color_management: + # if global settings are disabled return False because + # it is expected that no colorspace management is needed + log.info( + "Colorspace management is disabled." + ) + return {} + # check if host settings group is having activate_host_color_management - # it it does not have activation key then default it to True so it uses + # if it does not have activation key then default it to True so it uses # global settings # this is for backward compatibility # TODO: in future rewrite this to be more explicit From e7cf7c0fecb8ce73fcf586606af0a817a38ddbd8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:37:41 +0200 Subject: [PATCH 39/76] recognize global file rules switch --- openpype/pipeline/colorspace.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index ec793cd48b..652304ef33 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -357,7 +357,7 @@ def get_imageio_config( "activate_global_color_management", False) if not activate_color_management: - # if global settings are disabled return False because + # if global settings are disabled return empty dict because # it is expected that no colorspace management is needed log.info( "Colorspace management is disabled." @@ -477,6 +477,15 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): # get file rules from global and host_name frules_global = imageio_global["file_rules"] + activate_global_rules = frules_global.get( + "activate_global_file_rules", False) + + if not activate_global_rules: + log.info( + "Global File Rules are disabled." + ) + return {} + # host is optional, some might not have any settings frules_host = imageio_host.get("file_rules", {}) From 459a246948569451a16b00fecd4d1a2e8e9d5f6c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 3 May 2023 17:31:43 +0200 Subject: [PATCH 40/76] Adding labels to settings --- .../projects_schema/schema_project_aftereffects.json | 6 +++++- .../schemas/projects_schema/schema_project_blender.json | 6 +++++- .../schemas/projects_schema/schema_project_celaction.json | 6 +++++- .../schemas/projects_schema/schema_project_flame.json | 6 +++++- .../schemas/projects_schema/schema_project_fusion.json | 6 +++++- .../schemas/projects_schema/schema_project_global.json | 4 ++++ .../schemas/projects_schema/schema_project_harmony.json | 6 +++++- .../schemas/projects_schema/schema_project_hiero.json | 6 +++++- .../schemas/projects_schema/schema_project_houdini.json | 6 +++++- .../schemas/projects_schema/schema_project_max.json | 6 +++++- .../schemas/projects_schema/schema_project_maya.json | 6 +++++- .../schemas/projects_schema/schema_project_photoshop.json | 6 +++++- .../schemas/projects_schema/schema_project_resolve.json | 6 +++++- .../projects_schema/schema_project_traypublisher.json | 6 +++++- .../schemas/projects_schema/schema_project_tvpaint.json | 6 +++++- .../schemas/projects_schema/schema_project_unreal.json | 6 +++++- .../projects_schema/schema_project_webpublisher.json | 6 +++++- .../projects_schema/schemas/schema_nuke_imageio.json | 6 +++++- 18 files changed, 89 insertions(+), 17 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index d9007d6185..5da632a933 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 8997b750ec..b15b508661 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index 23268d0d9a..5729f70e2f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (derived to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index f18da95065..625780a650 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (remapped to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index b236925c1c..1e26e7d701 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json index 80ea73267b..d1d7f336e1 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json @@ -11,6 +11,10 @@ "label": "Color Management", "is_group": true, "children": [ + { + "type": "label", + "label": "It's important to note that once color management is activated on a project, all hosts will be color managed by default.
The OpenColorIO (OCIO) config file is used either from the global settings or from the host's overrides. It's worth
noting that the order of the defined configuration paths matters, with higher priority given to paths listed earlier in
the configuration list.

To avoid potential issues, ensure that the OCIO configuration path is not an absolute path and includes at least
the root token (Anatomy). This helps ensure that the configuration path remains valid across different environments and
avoids any hard-coding of paths that may be specific to one particular system." + }, { "type": "boolean", "key": "activate_global_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 840f1fa4c0..0357a79aea 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index e7bd91dcef..8c6be5d6d8 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 1fb23759cb..d50ebd948f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index bc632d4a20..10a12dbecc 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index c69ccb3f07..49bd1002aa 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -48,10 +48,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index c4bb81e7f8..898c3374d7 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (remapped to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index ef1880af67..758cf2a196 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (remapped to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index a07c262375..c234cd1b71 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (derived to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index 1c1d75c4e6..6d446b5550 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (derived to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 10f562508a..2d0870f76a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index bb4287d4b4..e319182e3c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -8,10 +8,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (derived to OCIO)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + }, { "type": "boolean", "key": "activate_host_color_management", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 9eed442f25..7aeb3d32db 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -1,10 +1,14 @@ { "key": "imageio", "type": "dict", - "label": "Color Management", + "label": "Color Management (OCIO managed)", "collapsible": true, "is_group": true, "children": [ + { + "type": "label", + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + }, { "type": "boolean", "key": "activate_host_color_management", From eb6f8c1abb68dc42d03635907e163b4a5da8833b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 3 May 2023 22:29:36 +0200 Subject: [PATCH 41/76] fixing typo --- .../schemas/projects_schema/schema_project_aftereffects.json | 2 +- .../schemas/projects_schema/schema_project_blender.json | 2 +- .../entities/schemas/projects_schema/schema_project_fusion.json | 2 +- .../schemas/projects_schema/schema_project_harmony.json | 2 +- .../entities/schemas/projects_schema/schema_project_hiero.json | 2 +- .../schemas/projects_schema/schema_project_houdini.json | 2 +- .../entities/schemas/projects_schema/schema_project_max.json | 2 +- .../entities/schemas/projects_schema/schema_project_maya.json | 2 +- .../entities/schemas/projects_schema/schema_project_unreal.json | 2 +- .../schemas/projects_schema/schemas/schema_nuke_imageio.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 5da632a933..ef09a71bda 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index b15b508661..c3eab6c3f0 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 1e26e7d701..6189da0e19 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 0357a79aea..a56f62c6d6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index 8c6be5d6d8..2c82e1a9ac 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index d50ebd948f..588e209718 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 10a12dbecc..5dac8ee7e9 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 49bd1002aa..55f231e235 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -54,7 +54,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 2d0870f76a..8c3ff71489 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 7aeb3d32db..f691518255 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -7,7 +7,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) confg path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." }, { "type": "boolean", From 6b1a801f4c14be4d4c601b7c7267dd01b659dad3 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 5 May 2023 15:55:27 +0200 Subject: [PATCH 42/76] adding links to documentation into settings labels --- .../schemas/projects_schema/schema_project_aftereffects.json | 2 +- .../schemas/projects_schema/schema_project_blender.json | 2 +- .../schemas/projects_schema/schema_project_celaction.json | 2 +- .../entities/schemas/projects_schema/schema_project_flame.json | 2 +- .../entities/schemas/projects_schema/schema_project_fusion.json | 2 +- .../entities/schemas/projects_schema/schema_project_global.json | 2 +- .../schemas/projects_schema/schema_project_harmony.json | 2 +- .../entities/schemas/projects_schema/schema_project_hiero.json | 2 +- .../schemas/projects_schema/schema_project_houdini.json | 2 +- .../entities/schemas/projects_schema/schema_project_max.json | 2 +- .../entities/schemas/projects_schema/schema_project_maya.json | 2 +- .../schemas/projects_schema/schema_project_photoshop.json | 2 +- .../schemas/projects_schema/schema_project_resolve.json | 2 +- .../schemas/projects_schema/schema_project_traypublisher.json | 2 +- .../schemas/projects_schema/schema_project_tvpaint.json | 2 +- .../entities/schemas/projects_schema/schema_project_unreal.json | 2 +- .../schemas/projects_schema/schema_project_webpublisher.json | 2 +- .../schemas/projects_schema/schemas/schema_nuke_imageio.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index ef09a71bda..d164a8f2c3 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index c3eab6c3f0..79eea3f192 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index 5729f70e2f..915f199b6e 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index 625780a650..16c9378194 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures." + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 6189da0e19..65584264c9 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json index d1d7f336e1..953361935c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_global.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_global.json @@ -13,7 +13,7 @@ "children": [ { "type": "label", - "label": "It's important to note that once color management is activated on a project, all hosts will be color managed by default.
The OpenColorIO (OCIO) config file is used either from the global settings or from the host's overrides. It's worth
noting that the order of the defined configuration paths matters, with higher priority given to paths listed earlier in
the configuration list.

To avoid potential issues, ensure that the OCIO configuration path is not an absolute path and includes at least
the root token (Anatomy). This helps ensure that the configuration path remains valid across different environments and
avoids any hard-coding of paths that may be specific to one particular system." + "label": "It's important to note that once color management is activated on a project, all hosts will be color managed by default.
The OpenColorIO (OCIO) config file is used either from the global settings or from the host's overrides. It's worth
noting that the order of the defined configuration paths matters, with higher priority given to paths listed earlier in
the configuration list.

To avoid potential issues, ensure that the OCIO configuration path is not an absolute path and includes at least
the root token (Anatomy). This helps ensure that the configuration path remains valid across different environments and
avoids any hard-coding of paths that may be specific to one particular system.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index a56f62c6d6..276b321b24 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index 2c82e1a9ac..c2339d8200 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index 588e209718..a7032775c1 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 5dac8ee7e9..d1e8e333cc 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index 55f231e235..fe7c262603 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -54,7 +54,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index 898c3374d7..7ddd575dde 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures." + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index 758cf2a196..aea019b77b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.." + "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation.." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index c234cd1b71..6b55837f12 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index 6d446b5550..ed8887f93e 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index 8c3ff71489..aa2fe40b4a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index e319182e3c..7b65dddda6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -14,7 +14,7 @@ "children": [ { "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing." + "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." }, { "type": "boolean", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index f691518255..864e084bde 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -7,7 +7,7 @@ "children": [ { "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures." + "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." }, { "type": "boolean", From 07a969df6ec384af473e3034eb678208aa5dfc77 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 10:29:41 +0200 Subject: [PATCH 43/76] adding resolve host to the pre ocio hook --- openpype/hooks/pre_ocio_hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index 49a042caa8..eac7d2696f 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -18,7 +18,8 @@ class OCIOEnvHook(PreLaunchHook): "houdini", "maya", "nuke", - "hiero" + "hiero", + "resolve" ] def execute(self): From ca9defe36975ec373b4c247819e4b9d0bf1fb382 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 13:11:13 +0200 Subject: [PATCH 44/76] label improvements --- openpype/pipeline/colorspace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 652304ef33..1cf7e2e192 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -360,7 +360,7 @@ def get_imageio_config( # if global settings are disabled return empty dict because # it is expected that no colorspace management is needed log.info( - "Colorspace management is disabled." + "Colorspace management is disabled globally." ) return {} @@ -482,7 +482,7 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): if not activate_global_rules: log.info( - "Global File Rules are disabled." + "Colorspace global file rules are disabled." ) return {} From 379f838f03160f0b3ae4d24df980c06be06efc59 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 14:50:59 +0200 Subject: [PATCH 45/76] distributing settings via template schemas --- .../schema_project_aftereffects.json | 18 +------- .../schema_project_blender.json | 18 +------- .../schema_project_celaction.json | 18 +------- .../projects_schema/schema_project_flame.json | 17 +------- .../schema_project_fusion.json | 17 +------- .../schema_project_harmony.json | 18 +------- .../projects_schema/schema_project_hiero.json | 17 +------- .../schema_project_houdini.json | 18 +------- .../projects_schema/schema_project_max.json | 18 +------- .../projects_schema/schema_project_maya.json | 17 +------- .../schema_project_photoshop.json | 18 +------- .../schema_project_resolve.json | 18 +------- .../schema_project_substancepainter.json | 11 ++--- .../schema_project_traypublisher.json | 18 +------- .../schema_project_tvpaint.json | 18 +------- .../schema_project_unreal.json | 18 +------- .../schema_project_webpublisher.json | 18 +------- .../schemas/schema_imageio_config.json | 20 --------- .../schemas/schema_imageio_file_rules.json | 40 ------------------ .../schemas/schema_nuke_imageio.json | 17 +------- .../template_colorspace_remapping.json | 29 +++++++++++++ ...emplate_host_color_management_derived.json | 19 +++++++++ .../template_host_color_management_ocio.json | 19 +++++++++ ...mplate_host_color_management_remapped.json | 23 ++++++++++ .../schemas/template_imageio_config.json | 22 ++++++++++ .../schemas/template_imageio_file_rules.json | 42 +++++++++++++++++++ 26 files changed, 191 insertions(+), 335 deletions(-) delete mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json delete mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_derived.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_ocio.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_remapped.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_config.json create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json index 7262c17dd5..d4f52b50d4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_aftereffects.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json index 79eea3f192..78a1552ac3 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_blender.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json index 915f199b6e..9d50e85631 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_celaction.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_derived" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index 16c9378194..102e2bdcc3 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -13,21 +13,8 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_remapped" }, { "key": "project", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json index 550e7a3cf4..656c50dd98 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_fusion.json @@ -13,21 +13,8 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } ] }, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 276b321b24..98a815f2d4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json index c2339d8200..d80edf902b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_hiero.json @@ -13,21 +13,8 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" }, { "key": "workfile", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json index a7032775c1..7f782e3647 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_houdini.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index ee2bbd4ffa..e314174dff 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index fe7c262603..dca955dab4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -53,21 +53,8 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" }, { "key": "workfile", diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json index 7ddd575dde..20d4ff0aa3 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_photoshop.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_remapped" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json index aea019b77b..2f10cc900a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_resolve.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation.." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_remapped" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_substancepainter.json b/openpype/settings/entities/schemas/projects_schema/schema_project_substancepainter.json index 79a39b8e6e..6be8cecad3 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_substancepainter.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_substancepainter.json @@ -8,18 +8,13 @@ { "key": "imageio", "type": "dict", - "label": "Color Management (ImageIO)", + "label": "Color Management (OCIO managed)", "is_group": true, "children": [ { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json index 6b55837f12..3703d82856 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_traypublisher.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_derived" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index ed8887f93e..45fc13bdde 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_derived" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json index aa2fe40b4a..b23744f406 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_unreal.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json index 7b65dddda6..87de732d69 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_webpublisher.json @@ -13,23 +13,9 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_derived" } - ] }, { diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json deleted file mode 100644 index bc65dd7826..0000000000 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "key": "ocio_config", - "type": "dict", - "label": "OCIO config", - "collapsible": true, - "children": [ - { - "type": "boolean", - "key": "override_global_config", - "label": "Override global OCIO config" - }, - { - "type": "path", - "key": "filepath", - "label": "Config path", - "multiplatform": false, - "multipath": true - } - ] -} diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json deleted file mode 100644 index 62b72c2518..0000000000 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_imageio_file_rules.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "key": "file_rules", - "type": "dict", - "label": "File Rules (OCIO v1 only)", - "collapsible": true, - "children": [ - { - "type": "boolean", - "key": "override_global_rules", - "label": "Override global File Rules" - }, - { - "key": "rules", - "label": "Rules", - "type": "dict-modifiable", - "highlight_content": true, - "collapsible": false, - "object_type": { - "type": "dict", - "children": [ - { - "key": "pattern", - "label": "Regex pattern", - "type": "text" - }, - { - "key": "colorspace", - "label": "Colorspace name", - "type": "text" - }, - { - "key": "ext", - "label": "File extension", - "type": "text" - } - ] - } - } - ] -} diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json index 864e084bde..d4cd332ef8 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_nuke_imageio.json @@ -6,21 +6,8 @@ "is_group": true, "children": [ { - "type": "label", - "label": "This application's colorspace management can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." - }, - { - "type": "boolean", - "key": "activate_host_color_management", - "label": "Enable Color Management" - }, - { - "type": "schema", - "name": "schema_imageio_config" - }, - { - "type": "schema", - "name": "schema_imageio_file_rules" + "type": "template", + "name": "template_host_color_management_ocio" }, { "key": "viewer", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json new file mode 100644 index 0000000000..9ae504fa81 --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json @@ -0,0 +1,29 @@ +[ + { + "key": "remapping", + "type": "dict", + "label": "Remapping colorspace names", + "collapsible": true, + "children": [ + { + "type": "list", + "key": "inputs", + "object_type": { + "type": "dict", + "children": [ + { + "type": "text", + "key": "internal_name", + "label": "Internal colorspace name" + }, + { + "type": "text", + "key": "ocio_name", + "label": "OCIO colorspace name" + } + ] + } + } + ] + } +] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_derived.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_derived.json new file mode 100644 index 0000000000..a129d470c0 --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_derived.json @@ -0,0 +1,19 @@ +[ + { + "type": "label", + "label": "The application does not include any built-in color management capabilities, OpenPype offers a solution
to this limitation by deriving valid colorspace names for the OpenColorIO (OCIO) color management
system from file paths, using File Rules feature only during Publishing.

Related documentation." + }, + { + "type": "boolean", + "key": "activate_host_color_management", + "label": "Enable Color Management" + }, + { + "type": "template", + "name": "template_imageio_config" + }, + { + "type": "template", + "name": "template_imageio_file_rules" + } +] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_ocio.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_ocio.json new file mode 100644 index 0000000000..88c22fa762 --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_ocio.json @@ -0,0 +1,19 @@ +[ + { + "type": "label", + "label": "Colorspace management for the application can be controlled through OpenPype settings.
Specifically, the configured OpenColorIO (OCIO) config path is utilized in the application's workfile.
Additionally, the File Rules feature can be leveraged for both publishing and loading procedures.

Related documentation." + }, + { + "type": "boolean", + "key": "activate_host_color_management", + "label": "Enable Color Management" + }, + { + "type": "template", + "name": "template_imageio_config" + }, + { + "type": "template", + "name": "template_imageio_file_rules" + } +] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_remapped.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_remapped.json new file mode 100644 index 0000000000..780264947f --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_host_color_management_remapped.json @@ -0,0 +1,23 @@ +[ + { + "type": "label", + "label": "The application includes internal color management functionality, but it does not offer external control
over this feature. To address this limitation, OpenPype uses mapping rules to remap the native
colorspace names used in the internal color management system to the OpenColorIO (OCIO)
color management system. Remapping feature is used in Publishing and Loading procedures.

Related documentation.." + }, + { + "type": "boolean", + "key": "activate_host_color_management", + "label": "Enable Color Management" + }, + { + "type": "template", + "name": "template_colorspace_remapping" + }, + { + "type": "template", + "name": "template_imageio_config" + }, + { + "type": "template", + "name": "template_imageio_file_rules" + } +] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_config.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_config.json new file mode 100644 index 0000000000..0550e5093c --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_config.json @@ -0,0 +1,22 @@ +[ + { + "key": "ocio_config", + "type": "dict", + "label": "OCIO config", + "collapsible": true, + "children": [ + { + "type": "boolean", + "key": "override_global_config", + "label": "Override global OCIO config" + }, + { + "type": "path", + "key": "filepath", + "label": "Config path", + "multiplatform": false, + "multipath": true + } + ] + } +] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json new file mode 100644 index 0000000000..829fd02489 --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json @@ -0,0 +1,42 @@ +[ + { + "key": "file_rules", + "type": "dict", + "label": "File Rules (OCIO v1 only)", + "collapsible": true, + "children": [ + { + "type": "boolean", + "key": "override_global_rules", + "label": "Override global File Rules" + }, + { + "key": "rules", + "label": "Rules", + "type": "dict-modifiable", + "highlight_content": true, + "collapsible": false, + "object_type": { + "type": "dict", + "children": [ + { + "key": "pattern", + "label": "Regex pattern", + "type": "text" + }, + { + "key": "colorspace", + "label": "Colorspace name", + "type": "text" + }, + { + "key": "ext", + "label": "File extension", + "type": "text" + } + ] + } + } + ] + } +] From c2055622ab98880eeb5a1a3475b7c9303bdcd93d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 15:51:29 +0200 Subject: [PATCH 46/76] adding remapping functionality --- openpype/pipeline/colorspace.py | 50 +++++++++++++++++++ .../projects_schema/schema_project_flame.json | 6 ++- .../template_colorspace_remapping.json | 6 +-- 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 1cf7e2e192..fa7ad5133c 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -17,6 +17,8 @@ from openpype.pipeline import Anatomy log = Logger.get_logger(__name__) +class cashed_data: + remapping: dict = None @contextlib.contextmanager def _make_temp_json_file(): @@ -497,6 +499,54 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): return frules_global["rules"] +def get_remapped_colorspace_to_native( + ocio_colorspace_name, host_name, imageio_host_settings): + """Return native colorspace name. + + Args: + ocio_colorspace_name (str | None): ocio colorspace name + + Returns: + str: native colorspace name defined in remapping or None + """ + + if not cashed_data.remapping.get(host_name): + remapping_rules = imageio_host_settings["remapping"]["rules"] + cashed_data.remapping[host_name] = { + "to_native": { + rule["ocio_name"]: input["host_native_name"] + for rule in remapping_rules + } + } + + return cashed_data.remapping[host_name]["to_native"].get( + ocio_colorspace_name) + + +def get_remapped_colorspace_from_native( + host_native_colorspace_name, host_name, imageio_host_settings): + """Return ocio colorspace name remapped from host native used name. + + Args: + host_native_colorspace_name (str): host native colorspace name + + Returns: + str: ocio colorspace name defined in remapping or None + """ + + if not cashed_data.remapping.get(host_name): + remapping_rules = imageio_host_settings["remapping"]["rules"] + cashed_data.remapping[host_name] = { + "from_native": { + input["host_native_name"]: rule["ocio_name"] + for rule in remapping_rules + } + } + + return cashed_data.remapping[host_name]["from_native"].get( + host_native_colorspace_name) + + def _get_imageio_settings(project_settings, host_name): """Get ImageIO settings for global and host diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json index 102e2bdcc3..06f818966f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_flame.json @@ -44,10 +44,14 @@ } ] }, + { + "type": "label", + "label": "Profile names mapping settings is deprecated use ./imagio/remapping instead" + }, { "key": "profilesMapping", "type": "dict", - "label": "Profile names mapping", + "label": "Profile names mapping [deprecated]", "collapsible": true, "children": [ { diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json index 9ae504fa81..acd36ece9d 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_colorspace_remapping.json @@ -7,14 +7,14 @@ "children": [ { "type": "list", - "key": "inputs", + "key": "rules", "object_type": { "type": "dict", "children": [ { "type": "text", - "key": "internal_name", - "label": "Internal colorspace name" + "key": "host_native_name", + "label": "Application native colorspace name" }, { "type": "text", From 05b0f61e0bad1db6226812c9d77f6dadef49ded5 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 16:22:33 +0200 Subject: [PATCH 47/76] flame: adding remapping implementation --- openpype/hosts/flame/api/plugin.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/flame/api/plugin.py b/openpype/hosts/flame/api/plugin.py index df8c1ac887..3289187fa0 100644 --- a/openpype/hosts/flame/api/plugin.py +++ b/openpype/hosts/flame/api/plugin.py @@ -10,6 +10,7 @@ from qtpy import QtCore, QtWidgets from openpype import style from openpype.lib import Logger, StringTemplate from openpype.pipeline import LegacyCreator, LoaderPlugin +from openpype.pipeline.colorspace import get_remapped_colorspace_to_native from openpype.settings import get_current_project_settings from . import constants @@ -701,6 +702,7 @@ class ClipLoader(LoaderPlugin): ] _mapping = None + _host_settings = None def apply_settings(cls, project_settings, system_settings): @@ -769,15 +771,26 @@ class ClipLoader(LoaderPlugin): Returns: str: native colorspace name defined in mapping or None """ + # TODO: rewrite to support only pipeline's remapping + if not cls._host_settings: + cls._host_settings = get_current_project_settings()["flame"] + + # [Deprecated] way of remapping if not cls._mapping: - settings = get_current_project_settings()["flame"] - mapping = settings["imageio"]["profilesMapping"]["inputs"] + mapping = ( + cls._host_settings["imageio"]["profilesMapping"]["inputs"]) cls._mapping = { input["ocioName"]: input["flameName"] for input in mapping } - return cls._mapping.get(input_colorspace) + native_name = cls._mapping.get(input_colorspace) + + if not native_name: + native_name = get_remapped_colorspace_to_native( + input_colorspace, "flame", cls._host_settings["imageio"]) + + return native_name class OpenClipSolver(flib.MediaInfoFile): From 6473fac9042e9257c05c2c4020c3352c178da5f5 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 16:25:34 +0200 Subject: [PATCH 48/76] fixing cashing nested data structure --- openpype/pipeline/colorspace.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index fa7ad5133c..5c449e0a4e 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -17,9 +17,11 @@ from openpype.pipeline import Anatomy log = Logger.get_logger(__name__) + class cashed_data: remapping: dict = None + @contextlib.contextmanager def _make_temp_json_file(): """Wrapping function for json temp file @@ -510,7 +512,7 @@ def get_remapped_colorspace_to_native( str: native colorspace name defined in remapping or None """ - if not cashed_data.remapping.get(host_name): + if not cashed_data.remapping.get(host_name, {}).get("to_native"): remapping_rules = imageio_host_settings["remapping"]["rules"] cashed_data.remapping[host_name] = { "to_native": { @@ -534,7 +536,7 @@ def get_remapped_colorspace_from_native( str: ocio colorspace name defined in remapping or None """ - if not cashed_data.remapping.get(host_name): + if not cashed_data.remapping.get(host_name, {}).get("from_native"): remapping_rules = imageio_host_settings["remapping"]["rules"] cashed_data.remapping[host_name] = { "from_native": { From 31d04e492b8277bcc6c982111bb783632a8c8e1d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 16:28:23 +0200 Subject: [PATCH 49/76] cosmetics --- openpype/pipeline/colorspace.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 5c449e0a4e..f0fb7cf7f5 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -18,8 +18,8 @@ from openpype.pipeline import Anatomy log = Logger.get_logger(__name__) -class cashed_data: - remapping: dict = None +class CashedData: + remapping = None @contextlib.contextmanager @@ -512,16 +512,16 @@ def get_remapped_colorspace_to_native( str: native colorspace name defined in remapping or None """ - if not cashed_data.remapping.get(host_name, {}).get("to_native"): + if not CashedData.remapping.get(host_name, {}).get("to_native"): remapping_rules = imageio_host_settings["remapping"]["rules"] - cashed_data.remapping[host_name] = { + CashedData.remapping[host_name] = { "to_native": { rule["ocio_name"]: input["host_native_name"] for rule in remapping_rules } } - return cashed_data.remapping[host_name]["to_native"].get( + return CashedData.remapping[host_name]["to_native"].get( ocio_colorspace_name) @@ -536,16 +536,16 @@ def get_remapped_colorspace_from_native( str: ocio colorspace name defined in remapping or None """ - if not cashed_data.remapping.get(host_name, {}).get("from_native"): + if not CashedData.remapping.get(host_name, {}).get("from_native"): remapping_rules = imageio_host_settings["remapping"]["rules"] - cashed_data.remapping[host_name] = { + CashedData.remapping[host_name] = { "from_native": { input["host_native_name"]: rule["ocio_name"] for rule in remapping_rules } } - return cashed_data.remapping[host_name]["from_native"].get( + return CashedData.remapping[host_name]["from_native"].get( host_native_colorspace_name) From 0f8a998e3aeac42e44c137ca837b75ab1cda15d1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 16:30:32 +0200 Subject: [PATCH 50/76] old docstring fix --- openpype/pipeline/colorspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index f0fb7cf7f5..5af313c570 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -333,7 +333,7 @@ def get_imageio_config( Defaults to None. Returns: - dict or bool: config path data or None + dict: config path data or empty dict """ project_settings = project_settings or get_project_settings(project_name) anatomy = anatomy or Anatomy(project_name) From e6b301fecbfc6ec8e5bd784808f7654123f07384 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 May 2023 16:45:43 +0200 Subject: [PATCH 51/76] defaults update --- openpype/settings/defaults/project_settings/flame.json | 3 +++ openpype/settings/defaults/project_settings/photoshop.json | 3 +++ openpype/settings/defaults/project_settings/resolve.json | 3 +++ .../settings/defaults/project_settings/substancepainter.json | 5 +++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/openpype/settings/defaults/project_settings/flame.json b/openpype/settings/defaults/project_settings/flame.json index 64021baeef..19773727ca 100644 --- a/openpype/settings/defaults/project_settings/flame.json +++ b/openpype/settings/defaults/project_settings/flame.json @@ -1,6 +1,9 @@ { "imageio": { "activate_host_color_management": true, + "remapping": { + "rules": [] + }, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/photoshop.json b/openpype/settings/defaults/project_settings/photoshop.json index 17da5dd738..ffcf87d8a5 100644 --- a/openpype/settings/defaults/project_settings/photoshop.json +++ b/openpype/settings/defaults/project_settings/photoshop.json @@ -1,6 +1,9 @@ { "imageio": { "activate_host_color_management": true, + "remapping": { + "rules": [] + }, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/resolve.json b/openpype/settings/defaults/project_settings/resolve.json index 7379e74200..f2d3727be1 100644 --- a/openpype/settings/defaults/project_settings/resolve.json +++ b/openpype/settings/defaults/project_settings/resolve.json @@ -1,6 +1,9 @@ { "imageio": { "activate_host_color_management": true, + "remapping": { + "rules": [] + }, "ocio_config": { "override_global_config": false, "filepath": [] diff --git a/openpype/settings/defaults/project_settings/substancepainter.json b/openpype/settings/defaults/project_settings/substancepainter.json index 60929e85fd..4a1b86f3f4 100644 --- a/openpype/settings/defaults/project_settings/substancepainter.json +++ b/openpype/settings/defaults/project_settings/substancepainter.json @@ -1,11 +1,12 @@ { "imageio": { + "activate_host_color_management": true, "ocio_config": { - "enabled": true, + "override_global_config": true, "filepath": [] }, "file_rules": { - "enabled": true, + "override_global_rules": true, "rules": {} } }, From 2388cf53cb10f0989b57d86ff0963670556e7ebb Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 29 May 2023 11:44:05 +0100 Subject: [PATCH 52/76] Support same attribute names on different node types. --- .../publish/validate_rendersettings.py | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py index ebf7b3138d..0ca7c6f5a7 100644 --- a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py +++ b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py @@ -274,16 +274,18 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): # go through definitions and test if such node.attribute exists. # if so, compare its value from the one required. - for attribute, data in cls.get_nodes(instance, renderer).items(): + for data in cls.get_nodes(instance, renderer): for node in data["nodes"]: try: render_value = cmds.getAttr( - "{}.{}".format(node, attribute) + "{}.{}".format(node, data["attribute"]) ) except RuntimeError: invalid = True cls.log.error( - "Cannot get value of {}.{}".format(node, attribute) + "Cannot get value of {}.{}".format( + node, data["attribute"] + ) ) else: if render_value not in data["values"]: @@ -291,7 +293,10 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): cls.log.error( "Invalid value {} set on {}.{}. Expecting " "{}".format( - render_value, node, attribute, data["values"] + render_value, + node, + data["attribute"], + data["values"] ) ) @@ -305,7 +310,7 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): "{}_render_attributes".format(renderer) ) or [] ) - result = {} + result = [] for attr, values in OrderedDict(validation_settings).items(): values = [convert_to_int_or_float(v) for v in values if v] @@ -335,7 +340,13 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): ) continue - result[attribute_name] = {"nodes": nodes, "values": values} + result.append( + { + "attribute": attribute_name, + "nodes": nodes, + "values": values + } + ) return result @@ -350,11 +361,11 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): "{aov_separator}", instance.data.get("aovSeparator", "_") ) - for attribute, data in cls.get_nodes(instance, renderer).items(): + for data in cls.get_nodes(instance, renderer): if not data["values"]: continue for node in data["nodes"]: - lib.set_attribute(attribute, data["values"][0], node) + lib.set_attribute(data["attribute"], data["values"][0], node) with lib.renderlayer(layer_node): default = lib.RENDER_ATTRS['default'] From ee41b877e666db4984d7525b05187b56d1e7b2b6 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 31 May 2023 16:10:17 +0200 Subject: [PATCH 53/76] refactor file rules logic to separate host activation This is implementing logic introduced here https://github.com/ynput/OpenPype/pull/4700#discussion_r1193612003 --- openpype/pipeline/colorspace.py | 12 ++++++------ .../defaults/project_settings/aftereffects.json | 2 +- .../settings/defaults/project_settings/blender.json | 2 +- .../defaults/project_settings/celaction.json | 2 +- .../settings/defaults/project_settings/flame.json | 2 +- .../settings/defaults/project_settings/fusion.json | 2 +- .../settings/defaults/project_settings/harmony.json | 2 +- .../settings/defaults/project_settings/hiero.json | 2 +- .../settings/defaults/project_settings/houdini.json | 2 +- openpype/settings/defaults/project_settings/max.json | 2 +- .../settings/defaults/project_settings/maya.json | 2 +- .../settings/defaults/project_settings/nuke.json | 2 +- .../defaults/project_settings/photoshop.json | 2 +- .../settings/defaults/project_settings/resolve.json | 2 +- .../defaults/project_settings/substancepainter.json | 2 +- .../defaults/project_settings/traypublisher.json | 2 +- .../settings/defaults/project_settings/tvpaint.json | 2 +- .../settings/defaults/project_settings/unreal.json | 2 +- .../defaults/project_settings/webpublisher.json | 2 +- .../schemas/template_imageio_file_rules.json | 4 ++-- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 5af313c570..d4011d32c9 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -483,22 +483,22 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): frules_global = imageio_global["file_rules"] activate_global_rules = frules_global.get( "activate_global_file_rules", False) + global_rules = frules_global["rules"] if not activate_global_rules: log.info( "Colorspace global file rules are disabled." ) - return {} + global_rules = {} # host is optional, some might not have any settings frules_host = imageio_host.get("file_rules", {}) # compile file rules dictionary - override_global_rules = frules_host.get("override_global_rules") - if override_global_rules: - return frules_host["rules"] - else: - return frules_global["rules"] + activate_host_rules = frules_host.get("activate_host_rules") + + # return host rules if activated or global rules + return frules_host["rules"] if activate_host_rules else global_rules def get_remapped_colorspace_to_native( diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index 1a312c27df..9be8a6e7d5 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/blender.json b/openpype/settings/defaults/project_settings/blender.json index 7cdbb0e6fb..eae5b239c8 100644 --- a/openpype/settings/defaults/project_settings/blender.json +++ b/openpype/settings/defaults/project_settings/blender.json @@ -11,7 +11,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/celaction.json b/openpype/settings/defaults/project_settings/celaction.json index 0e8b465118..af56a36649 100644 --- a/openpype/settings/defaults/project_settings/celaction.json +++ b/openpype/settings/defaults/project_settings/celaction.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/flame.json b/openpype/settings/defaults/project_settings/flame.json index 19773727ca..5b4b62c140 100644 --- a/openpype/settings/defaults/project_settings/flame.json +++ b/openpype/settings/defaults/project_settings/flame.json @@ -9,7 +9,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} }, "project": { diff --git a/openpype/settings/defaults/project_settings/fusion.json b/openpype/settings/defaults/project_settings/fusion.json index 822ec422df..0ee7d6127d 100644 --- a/openpype/settings/defaults/project_settings/fusion.json +++ b/openpype/settings/defaults/project_settings/fusion.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/harmony.json b/openpype/settings/defaults/project_settings/harmony.json index e6fb00a700..02f51d1d2b 100644 --- a/openpype/settings/defaults/project_settings/harmony.json +++ b/openpype/settings/defaults/project_settings/harmony.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/hiero.json b/openpype/settings/defaults/project_settings/hiero.json index 01eb15bfbc..9c83733b09 100644 --- a/openpype/settings/defaults/project_settings/hiero.json +++ b/openpype/settings/defaults/project_settings/hiero.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} }, "workfile": { diff --git a/openpype/settings/defaults/project_settings/houdini.json b/openpype/settings/defaults/project_settings/houdini.json index 2b7192ff99..a53f1ff202 100644 --- a/openpype/settings/defaults/project_settings/houdini.json +++ b/openpype/settings/defaults/project_settings/houdini.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index db203f7f46..bfb1aa4aeb 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 14d4408138..19c3da13e6 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -416,7 +416,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} }, "workfile": { diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 5262694484..cdfc236d5c 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -15,7 +15,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} }, "viewer": { diff --git a/openpype/settings/defaults/project_settings/photoshop.json b/openpype/settings/defaults/project_settings/photoshop.json index ffcf87d8a5..71f94f5bfc 100644 --- a/openpype/settings/defaults/project_settings/photoshop.json +++ b/openpype/settings/defaults/project_settings/photoshop.json @@ -9,7 +9,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/resolve.json b/openpype/settings/defaults/project_settings/resolve.json index f2d3727be1..da47ae2553 100644 --- a/openpype/settings/defaults/project_settings/resolve.json +++ b/openpype/settings/defaults/project_settings/resolve.json @@ -9,7 +9,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/substancepainter.json b/openpype/settings/defaults/project_settings/substancepainter.json index 4a1b86f3f4..4adeff98ef 100644 --- a/openpype/settings/defaults/project_settings/substancepainter.json +++ b/openpype/settings/defaults/project_settings/substancepainter.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": true, + "activate_host_rules": true, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/traypublisher.json b/openpype/settings/defaults/project_settings/traypublisher.json index 6f22f8a6ec..3a42c93515 100644 --- a/openpype/settings/defaults/project_settings/traypublisher.json +++ b/openpype/settings/defaults/project_settings/traypublisher.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/tvpaint.json b/openpype/settings/defaults/project_settings/tvpaint.json index 3c930b84eb..1f4f468656 100644 --- a/openpype/settings/defaults/project_settings/tvpaint.json +++ b/openpype/settings/defaults/project_settings/tvpaint.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/unreal.json b/openpype/settings/defaults/project_settings/unreal.json index 5adf1cce60..20e55c74f0 100644 --- a/openpype/settings/defaults/project_settings/unreal.json +++ b/openpype/settings/defaults/project_settings/unreal.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/defaults/project_settings/webpublisher.json b/openpype/settings/defaults/project_settings/webpublisher.json index 17d61ef028..e451bcfc17 100644 --- a/openpype/settings/defaults/project_settings/webpublisher.json +++ b/openpype/settings/defaults/project_settings/webpublisher.json @@ -6,7 +6,7 @@ "filepath": [] }, "file_rules": { - "override_global_rules": false, + "activate_host_rules": false, "rules": {} } }, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json index 829fd02489..5c6c696578 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_imageio_file_rules.json @@ -7,8 +7,8 @@ "children": [ { "type": "boolean", - "key": "override_global_rules", - "label": "Override global File Rules" + "key": "activate_host_rules", + "label": "Activate Host File Rules" }, { "key": "rules", From 711dd888e960fb3cdb5ce246fbcefb920ca1b217 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 1 Jun 2023 12:37:39 +0200 Subject: [PATCH 54/76] updating testing data --- tests/unit/openpype/pipeline/publish/test_publish_plugins.py | 2 +- tests/unit/openpype/pipeline/test_colorspace.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py index bbeab2cc90..aace8cf7e3 100644 --- a/tests/unit/openpype/pipeline/publish/test_publish_plugins.py +++ b/tests/unit/openpype/pipeline/publish/test_publish_plugins.py @@ -37,7 +37,7 @@ class TestPipelinePublishPlugins(TestPipeline): # files are the same as those used in `test_pipeline_colorspace` TEST_FILES = [ ( - "1YinxOToVyAd3-jAMFgVf7EWQa2x8Ma-O", + "1Lf-mFxev7xiwZCWfImlRcw7Fj8XgNQMh", "test_pipeline_colorspace.zip", "" ) diff --git a/tests/unit/openpype/pipeline/test_colorspace.py b/tests/unit/openpype/pipeline/test_colorspace.py index d0981723ad..c22acee2d4 100644 --- a/tests/unit/openpype/pipeline/test_colorspace.py +++ b/tests/unit/openpype/pipeline/test_colorspace.py @@ -31,7 +31,7 @@ class TestPipelineColorspace(TestPipeline): TEST_FILES = [ ( - "1YinxOToVyAd3-jAMFgVf7EWQa2x8Ma-O", + "1Lf-mFxev7xiwZCWfImlRcw7Fj8XgNQMh", "test_pipeline_colorspace.zip", "" ) From a98ef68549d090a738615f1cefdbf3cbeac22c95 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 6 Jun 2023 16:49:34 +0200 Subject: [PATCH 55/76] fixing publisher parent --- openpype/hosts/nuke/api/pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpype/hosts/nuke/api/pipeline.py b/openpype/hosts/nuke/api/pipeline.py index 88f7144542..e7c1c0ba0e 100644 --- a/openpype/hosts/nuke/api/pipeline.py +++ b/openpype/hosts/nuke/api/pipeline.py @@ -240,12 +240,14 @@ def _install_menu(): menu.addCommand( "Create...", lambda: host_tools.show_publisher( + parent=main_window, tab="create" ) ) menu.addCommand( "Publish...", lambda: host_tools.show_publisher( + parent=main_window, tab="publish" ) ) From bb56d5dc16f73f15c502281516361385cc4d06d8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 6 Jun 2023 16:49:48 +0200 Subject: [PATCH 56/76] fixing nuke settings default --- .../settings/defaults/project_settings/nuke.json | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index 3f8be4c872..8eca824a6a 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -148,7 +148,7 @@ }, { "plugins": [ - "CreateWriteStill" + "CreateWriteImage" ], "nukeNodeClass": "Write", "knobs": [ @@ -556,15 +556,7 @@ "load": { "LoadImage": { "enabled": true, - "_representations": [ - "exr", - "dpx", - "jpg", - "jpeg", - "png", - "psd", - "tiff" - ], + "_representations": [], "node_name_template": "{class_name}_{ext}" }, "LoadClip": { From fbb6afe5c370101918b77e54ec8aeeec6ab9409a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 6 Jun 2023 17:17:42 +0200 Subject: [PATCH 57/76] adding psd to IMAGE_EXTENSIONS constant --- openpype/lib/transcoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/lib/transcoding.py b/openpype/lib/transcoding.py index 57968b3700..de6495900e 100644 --- a/openpype/lib/transcoding.py +++ b/openpype/lib/transcoding.py @@ -51,7 +51,7 @@ IMAGE_EXTENSIONS = { ".jng", ".jpeg", ".jpeg-ls", ".jpeg", ".2000", ".jpg", ".xr", ".jpeg", ".xt", ".jpeg-hdr", ".kra", ".mng", ".miff", ".nrrd", ".ora", ".pam", ".pbm", ".pgm", ".ppm", ".pnm", ".pcx", ".pgf", - ".pictor", ".png", ".psb", ".psp", ".qtvr", ".ras", + ".pictor", ".png", ".psd", ".psb", ".psp", ".qtvr", ".ras", ".rgbe", ".logluv", ".tiff", ".sgi", ".tga", ".tiff", ".tiff/ep", ".tiff/it", ".ufo", ".ufp", ".wbmp", ".webp", ".xbm", ".xcf", ".xpm", ".xwd" From b3cab6a88b1fd2c8e3eb3606bfc4d5f8cafa10cb Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 7 Jun 2023 11:34:59 +0200 Subject: [PATCH 58/76] adding parent to publisher only if nuke higher then 14 --- openpype/hosts/nuke/api/__init__.py | 4 +++- openpype/hosts/nuke/api/lib.py | 11 +++++++++++ openpype/hosts/nuke/api/pipeline.py | 12 +++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/nuke/api/__init__.py b/openpype/hosts/nuke/api/__init__.py index 1af5ff365d..55c4b8c808 100644 --- a/openpype/hosts/nuke/api/__init__.py +++ b/openpype/hosts/nuke/api/__init__.py @@ -43,7 +43,8 @@ from .lib import ( get_node_data, set_node_data, update_node_data, - create_write_node + create_write_node, + get_app_version_info ) from .utils import ( colorspace_exists_on_node, @@ -90,6 +91,7 @@ __all__ = ( "set_node_data", "update_node_data", "create_write_node", + "get_app_version_info", "colorspace_exists_on_node", "get_colorspace_list" diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 4a57bc3165..bf66b9e1a9 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -3116,3 +3116,14 @@ def get_viewer_config_from_string(input_string): ).format(input_string)) return (display, viewer) + + +def get_app_version_info(): + """ Return dict of Nuke's version semantic info""" + dot_split = nuke.NUKE_VERSION_STRING.split(".") + v_spit = dot_split[1].split("v") + return { + "major": int(dot_split[0]), + "minor": int(v_spit[0]), + "patch": int(v_spit[1]) + } diff --git a/openpype/hosts/nuke/api/pipeline.py b/openpype/hosts/nuke/api/pipeline.py index e7c1c0ba0e..998c03b3dd 100644 --- a/openpype/hosts/nuke/api/pipeline.py +++ b/openpype/hosts/nuke/api/pipeline.py @@ -43,7 +43,8 @@ from .lib import ( add_scripts_menu, add_scripts_gizmo, get_node_data, - set_node_data + set_node_data, + get_app_version_info ) from .workfile_template_builder import ( NukePlaceholderLoadPlugin, @@ -218,6 +219,7 @@ def _install_menu(): main_window = get_main_window() menubar = nuke.menu("Nuke") menu = menubar.addMenu(MENU_LABEL) + app_version = get_app_version_info() if not ASSIST: label = "{0}, {1}".format( @@ -237,17 +239,21 @@ def _install_menu(): menu.addSeparator() if not ASSIST: + # only add parent if nuke version is 14 or higher + # known issue with no solution yet menu.addCommand( "Create...", lambda: host_tools.show_publisher( - parent=main_window, + parent=main_window if app_version["major"] >= 14 else None, tab="create" ) ) + # only add parent if nuke version is 14 or higher + # known issue with no solution yet menu.addCommand( "Publish...", lambda: host_tools.show_publisher( - parent=main_window, + parent=main_window if app_version["major"] >= 14 else None, tab="publish" ) ) From f423ebcfcbeadacc12a8af5ff5a5e32f13c1a1e2 Mon Sep 17 00:00:00 2001 From: Oscar Domingo Date: Thu, 8 Jun 2023 10:40:46 +0100 Subject: [PATCH 59/76] Keep `publisher.create_widget` variant when creating subsets Whenever a person is creating a subset to publish, the "creator" widget resets (where you choose the variant, product, etc.) so if the person is publishing several images of the a variant which is not the default one, they have to keep selecting the correct one after every "create". This commit resets the original variant upon successful creation of a subset for publishing. --- openpype/tools/publisher/widgets/create_widget.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/tools/publisher/widgets/create_widget.py b/openpype/tools/publisher/widgets/create_widget.py index 30980af03d..b7605b1188 100644 --- a/openpype/tools/publisher/widgets/create_widget.py +++ b/openpype/tools/publisher/widgets/create_widget.py @@ -828,6 +828,7 @@ class CreateWidget(QtWidgets.QWidget): if success: self._set_creator(self._selected_creator) + self.variant_input.setText(variant) self._controller.emit_card_message("Creation finished...") self._last_thumbnail_path = None self._thumbnail_widget.set_current_thumbnails() From fbf4605417493ed5c0cf4646a9b0645ffc9f7c46 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 12:40:05 +0200 Subject: [PATCH 60/76] removing get_app_version_info --- openpype/hosts/nuke/api/__init__.py | 4 +--- openpype/hosts/nuke/api/lib.py | 11 ----------- openpype/hosts/nuke/api/pipeline.py | 12 +++++++----- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/openpype/hosts/nuke/api/__init__.py b/openpype/hosts/nuke/api/__init__.py index 55c4b8c808..1af5ff365d 100644 --- a/openpype/hosts/nuke/api/__init__.py +++ b/openpype/hosts/nuke/api/__init__.py @@ -43,8 +43,7 @@ from .lib import ( get_node_data, set_node_data, update_node_data, - create_write_node, - get_app_version_info + create_write_node ) from .utils import ( colorspace_exists_on_node, @@ -91,7 +90,6 @@ __all__ = ( "set_node_data", "update_node_data", "create_write_node", - "get_app_version_info", "colorspace_exists_on_node", "get_colorspace_list" diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index bf66b9e1a9..4a57bc3165 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -3116,14 +3116,3 @@ def get_viewer_config_from_string(input_string): ).format(input_string)) return (display, viewer) - - -def get_app_version_info(): - """ Return dict of Nuke's version semantic info""" - dot_split = nuke.NUKE_VERSION_STRING.split(".") - v_spit = dot_split[1].split("v") - return { - "major": int(dot_split[0]), - "minor": int(v_spit[0]), - "patch": int(v_spit[1]) - } diff --git a/openpype/hosts/nuke/api/pipeline.py b/openpype/hosts/nuke/api/pipeline.py index 998c03b3dd..8406a251e9 100644 --- a/openpype/hosts/nuke/api/pipeline.py +++ b/openpype/hosts/nuke/api/pipeline.py @@ -43,8 +43,7 @@ from .lib import ( add_scripts_menu, add_scripts_gizmo, get_node_data, - set_node_data, - get_app_version_info + set_node_data ) from .workfile_template_builder import ( NukePlaceholderLoadPlugin, @@ -219,7 +218,6 @@ def _install_menu(): main_window = get_main_window() menubar = nuke.menu("Nuke") menu = menubar.addMenu(MENU_LABEL) - app_version = get_app_version_info() if not ASSIST: label = "{0}, {1}".format( @@ -244,7 +242,9 @@ def _install_menu(): menu.addCommand( "Create...", lambda: host_tools.show_publisher( - parent=main_window if app_version["major"] >= 14 else None, + parent=( + main_window if nuke.NUKE_VERSION_RELEASE >= 14 else None + ), tab="create" ) ) @@ -253,7 +253,9 @@ def _install_menu(): menu.addCommand( "Publish...", lambda: host_tools.show_publisher( - parent=main_window if app_version["major"] >= 14 else None, + parent=( + main_window if nuke.NUKE_VERSION_RELEASE >= 14 else None + ), tab="publish" ) ) From a80b1b0f766ad127927575a4e91b7bb48fdb446d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 13:59:27 +0200 Subject: [PATCH 61/76] fixing still to image family conversion --- openpype/hosts/nuke/plugins/publish/extract_render_local.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/nuke/plugins/publish/extract_render_local.py b/openpype/hosts/nuke/plugins/publish/extract_render_local.py index e5feda4cd8..e2cf2addc5 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_render_local.py +++ b/openpype/hosts/nuke/plugins/publish/extract_render_local.py @@ -23,7 +23,7 @@ class NukeRenderLocal(publish.Extractor, order = pyblish.api.ExtractorOrder label = "Render Local" hosts = ["nuke"] - families = ["render.local", "prerender.local", "still.local"] + families = ["render.local", "prerender.local", "image.local"] def process(self, instance): child_nodes = ( @@ -136,9 +136,9 @@ class NukeRenderLocal(publish.Extractor, families.remove('prerender.local') families.insert(0, "prerender") instance.data["anatomyData"]["family"] = "prerender" - elif "still.local" in families: + elif "image.local" in families: instance.data['family'] = 'image' - families.remove('still.local') + families.remove('image.local') instance.data["anatomyData"]["family"] = "image" instance.data["families"] = families From 13efd0eceb3cbeb41e1acb909667b173b363e353 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Fri, 9 Jun 2023 16:16:43 +0200 Subject: [PATCH 62/76] :bug: fix 3dsmax host name 3dsmax host name is just `max` --- openpype/hooks/pre_ocio_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index eac7d2696f..7af0f4ceef 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -14,7 +14,7 @@ class OCIOEnvHook(PreLaunchHook): "fusion", "blender", "aftereffects", - "3dsmax", + "max", "houdini", "maya", "nuke", From 4d40857ed80757a762ade8c49359c14490eb32f5 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:24:42 +0200 Subject: [PATCH 63/76] removing redundant hook --- openpype/hooks/pre_host_set_ocio.py | 37 ----------------------------- 1 file changed, 37 deletions(-) delete mode 100644 openpype/hooks/pre_host_set_ocio.py diff --git a/openpype/hooks/pre_host_set_ocio.py b/openpype/hooks/pre_host_set_ocio.py deleted file mode 100644 index 3620d88db6..0000000000 --- a/openpype/hooks/pre_host_set_ocio.py +++ /dev/null @@ -1,37 +0,0 @@ -from openpype.lib import PreLaunchHook - -from openpype.pipeline.colorspace import get_imageio_config -from openpype.pipeline.template_data import get_template_data - - -class PreLaunchHostSetOCIO(PreLaunchHook): - """Set OCIO environment for the host""" - - order = 0 - app_groups = ["substancepainter"] - - def execute(self): - """Hook entry method.""" - - anatomy_data = get_template_data( - project_doc=self.data["project_doc"], - asset_doc=self.data["asset_doc"], - task_name=self.data["task_name"], - host_name=self.host_name, - system_settings=self.data["system_settings"] - ) - - ocio_config = get_imageio_config( - project_name=self.data["project_doc"]["name"], - host_name=self.host_name, - project_settings=self.data["project_settings"], - anatomy_data=anatomy_data, - anatomy=self.data["anatomy"] - ) - - if ocio_config: - ocio_path = ocio_config["path"] - self.log.info(f"Setting OCIO config path: {ocio_path}") - self.launch_context.env["OCIO"] = ocio_path - else: - self.log.debug("OCIO not set or enabled") From 4595813ea6031e7147a3daa2c825fd6b70dd0b02 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:25:33 +0200 Subject: [PATCH 64/76] merge from redundant hook --- openpype/hooks/pre_ocio_hook.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/hooks/pre_ocio_hook.py b/openpype/hooks/pre_ocio_hook.py index 7af0f4ceef..8f462665bc 100644 --- a/openpype/hooks/pre_ocio_hook.py +++ b/openpype/hooks/pre_ocio_hook.py @@ -11,6 +11,7 @@ class OCIOEnvHook(PreLaunchHook): order = 0 hosts = [ + "substancepainter", "fusion", "blender", "aftereffects", @@ -48,3 +49,5 @@ class OCIOEnvHook(PreLaunchHook): f"Setting OCIO environment to config path: {ocio_path}") self.launch_context.env["OCIO"] = ocio_path + else: + self.log.debug("OCIO not set or enabled") From f0d7876db70b09e5763906d91f9660b7019552e8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:26:22 +0200 Subject: [PATCH 65/76] backward compatibility - for hosts which had activated ocio_config in overrides - those are group settings. --- openpype/pipeline/colorspace.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index d4011d32c9..7e6efabf20 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -357,8 +357,12 @@ def get_imageio_config( imageio_global, imageio_host = _get_imageio_settings( project_settings, host_name) - activate_color_management = imageio_global.get( - "activate_global_color_management", False) + activate_color_management = ( + imageio_global.get("activate_global_color_management", False) + # for already saved overrides from previous version + # TODO: remove this in future - backward compatibility + or imageio_host.get("ocio_config").get("enabled") + ) if not activate_color_management: # if global settings are disabled return empty dict because @@ -391,7 +395,12 @@ def get_imageio_config( # depending on override flag # TODO: in future rewrite this to be more explicit config_data = None - override_global_config = config_host.get("override_global_config") + override_global_config = ( + config_host.get("override_global_config") + # for already saved overrides from previous version + # TODO: remove this in future - backward compatibility + or config_host.get("enabled") + ) if override_global_config: config_data = _get_config_data( config_host["filepath"], formatting_data From a71fed7a566579740eb34d4066fa420ccceaf109 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:27:06 +0200 Subject: [PATCH 66/76] nuke: backward compatibility for older project settings --- openpype/hosts/nuke/api/lib.py | 67 ++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 912bc5963b..777f4454dc 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -39,6 +39,7 @@ from openpype.settings import ( from openpype.modules import ModulesManager from openpype.pipeline.template_data import get_template_data_with_names from openpype.pipeline import ( + get_current_project_name, discover_legacy_creator_plugins, legacy_io, Anatomy, @@ -2008,37 +2009,65 @@ class WorkfileSettings(object): imageio_host (dict): host colorspace configurations ''' + config_data = get_imageio_config( + project_name=get_current_project_name(), + host_name="nuke" + ) + workfile_settings = imageio_host["workfile"] - # first set OCIO - if self._root_node["colorManagement"].value() \ - not in str(workfile_settings["colorManagement"]): - self._root_node["colorManagement"].setValue( - str(workfile_settings["colorManagement"])) + if not config_data: + # TODO: backward compatibility for old projects - remove later + # perhaps old project overrides is having it set to older version + # with use of `customOCIOConfigPath` + if workfile_settings.get("customOCIOConfigPath"): + unresolved_path = workfile_settings["customOCIOConfigPath"] + ocio_paths = unresolved_path[platform.system().lower()] - # we dont need the key anymore - workfile_settings.pop("colorManagement") + resolved_path = None + for ocio_p in ocio_paths: + resolved_path = str(ocio_p).format(**os.environ) + if not os.path.exists(resolved_path): + continue + if resolved_path: + # set values to root + self._root_node["colorManagement"].setValue("OCIO") + self._root_node["OCIO_config"].setValue("custom") + self._root_node["customOCIOConfigPath"].setValue( + resolved_path) + else: + # no ocio config found and no custom path used + if self._root_node["colorManagement"].value() \ + not in str(workfile_settings["colorManagement"]): + self._root_node["colorManagement"].setValue( + str(workfile_settings["colorManagement"])) - # second set ocio version - if self._root_node["OCIO_config"].value() \ - not in str(workfile_settings["OCIO_config"]): - self._root_node["OCIO_config"].setValue( - str(workfile_settings["OCIO_config"])) + # second set ocio version + if self._root_node["OCIO_config"].value() \ + not in str(workfile_settings["OCIO_config"]): + self._root_node["OCIO_config"].setValue( + str(workfile_settings["OCIO_config"])) - # we dont need the key anymore - workfile_settings.pop("OCIO_config") + else: + # set values to root + self._root_node["colorManagement"].setValue("OCIO") + + # we dont need the key anymore + workfile_settings.pop("customOCIOConfigPath") + workfile_settings.pop("colorManagement") + workfile_settings.pop("OCIO_config") # then set the rest - for knob, value in workfile_settings.items(): + for knob, value_ in workfile_settings.items(): # skip unfilled ocio config path # it will be dict in value - if isinstance(value, dict): + if isinstance(value_, dict): continue - if self._root_node[knob].value() not in value: - self._root_node[knob].setValue(str(value)) + if self._root_node[knob].value() not in value_: + self._root_node[knob].setValue(str(value_)) log.debug("nuke.root()['{}'] changed to: {}".format( - knob, value)) + knob, value_)) def set_writes_colorspace(self): ''' Adds correct colorspace to write node dict From 44bf1dcc8a1111f0b8d10319c0dce48fe24fd733 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:33:47 +0200 Subject: [PATCH 67/76] backward combability for file rules --- openpype/pipeline/colorspace.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 7e6efabf20..899b14148b 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -490,8 +490,11 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): # get file rules from global and host_name frules_global = imageio_global["file_rules"] - activate_global_rules = frules_global.get( - "activate_global_file_rules", False) + activate_global_rules = ( + frules_global.get("activate_global_file_rules", False) + # TODO: remove this in future - backward compatibility + or frules_global.get("enabled") + ) global_rules = frules_global["rules"] if not activate_global_rules: @@ -504,7 +507,11 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): frules_host = imageio_host.get("file_rules", {}) # compile file rules dictionary - activate_host_rules = frules_host.get("activate_host_rules") + activate_host_rules = ( + frules_host.get("activate_host_rules") + # TODO: remove this in future - backward compatibility + or frules_host.get("enabled") + ) # return host rules if activated or global rules return frules_host["rules"] if activate_host_rules else global_rules From aaf8756e18008552b89dacaff19ba1d4b0de12f4 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 Jun 2023 16:57:14 +0200 Subject: [PATCH 68/76] hiero: backward compatibility --- openpype/hosts/hiero/api/lib.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/hiero/api/lib.py b/openpype/hosts/hiero/api/lib.py index 0d4368529f..fa874f9e9d 100644 --- a/openpype/hosts/hiero/api/lib.py +++ b/openpype/hosts/hiero/api/lib.py @@ -23,11 +23,17 @@ except ImportError: from openpype.client import get_project from openpype.settings import get_project_settings -from openpype.pipeline import legacy_io, Anatomy +from openpype.pipeline import ( + get_current_project_name, legacy_io, Anatomy +) from openpype.pipeline.load import filter_containers from openpype.lib import Logger from . import tags +from openpype.pipeline.colorspace import ( + get_imageio_config +) + class DeprecatedWarning(DeprecationWarning): pass @@ -1047,6 +1053,18 @@ def apply_colorspace_project(): imageio = get_project_settings(project_name)["hiero"]["imageio"] presets = imageio.get("workfile") + # backward compatibility layer + # TODO: remove this after some time + config_data = get_imageio_config( + project_name=get_current_project_name(), + host_name="hiero" + ) + + if config_data: + presets.update({ + "ocioConfigName": "custom" + }) + # save the workfile as subversion "comment:_colorspaceChange" split_current_file = os.path.splitext(current_file) copy_current_file = current_file From 7be1d97118e2c2b3cb159b2fe192caa233872002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Fri, 9 Jun 2023 17:01:05 +0200 Subject: [PATCH 69/76] Update openpype/hosts/flame/hooks/pre_flame_setup.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fabià Serra Arrizabalaga --- openpype/hosts/flame/hooks/pre_flame_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 1f01499333..83110bb6b5 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -47,7 +47,11 @@ class FlamePrelaunch(PreLaunchHook): imageio_flame = project_settings["flame"]["imageio"] - # get host imageio settings enabled key if exists + # Check whether 'enabled' key from host imageio settings exists + # so we can tell if host is using the new colormanagement framework. + # If the 'enabled' isn't found we want 'colormanaged' set to True + # because prior to the key existing we always did colormanagement for + # Flame colormanaged = imageio_flame.get("enabled") # if key was not found, set to True # ensuring backward compatibility From cd7317410be99bdd1d109e5227bd8c5301f84c21 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Fri, 9 Jun 2023 15:28:20 +0000 Subject: [PATCH 70/76] [Automated] Release --- CHANGELOG.md | 393 ++++++++++++++++++++++++++++++++++++++++++++ openpype/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 395 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6544e659..882620f26c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,399 @@ # Changelog +## [3.15.10](https://github.com/ynput/OpenPype/tree/3.15.10) + + +[Full Changelog](https://github.com/ynput/OpenPype/compare/3.15.9...3.15.10) + +### **🆕 New features** + + +
+ImageIO: Adding ImageIO activation toggle to all hosts #4700 + +Colorspace management can now be enabled at the project level, although it is disabled by default. Once enabled, all hosts will use the OCIO config file defined in the settings. If settings are disabled, the system switches to DCC's native color space management, and we do not store colorspace information at the representative level. + + +___ + +
+ + +
+Redshift Proxy Support in 3dsMax #4625 + +Redshift Proxy Support for 3dsMax. +- [x] Creator +- [x] Loader +- [x] Extractor +- [x] Validator +- [x] Add documentation + + +___ + +
+ + +
+Houdini farm publishing and rendering #4825 + +Deadline Farm publishing and Rendering for Houdini +- [x] Mantra +- [x] Karma(including usd renders) +- [x] Arnold +- [x] Elaborate Redshift ROP for deadline submission +- [x] fix the existing bug in Redshift ROP +- [x] Vray +- [x] add docs + + +___ + +
+ + +
+Feature: Blender hook to execute python scripts at launch #4905 + +Hook to allow hooks to add path to a python script that will be executed when Blender starts. + + +___ + +
+ + +
+Feature: Resolve: Open last workfile on launch through .scriptlib #5047 + +Added implementation to Resolve integration to open last workfile on launch. + + +___ + +
+ + +
+General: Remove default windowFlags from publisher #5089 + +The default windowFlags is making the publisher window (in Linux at least) only show the close button and it's frustrating as many times you just want to minimize the window and get back to the validation after. Removing that line I get what I'd expect.**Before:****After:** + + +___ + +
+ + +
+General: Show user who created the workfile on the details pane of workfile manager #5093 + +New PR for https://github.com/ynput/OpenPype/pull/5087, which was closed after merging `next-minor` branch and then realizing we don't need to target it as it was decided it's not required to support windows. More info on that PR discussion.Small addition to add name of the `user` who created the workfile on the details pane of the workfile manager: + + +___ + +
+ + +
+Loader: Hide inactive versions in UI #5100 + +Hide versions with `active` set to `False` in Loader UI. + + +___ + +
+ +### **🚀 Enhancements** + + +
+Maya: Repair RenderPass token when merging AOVs. #5055 + +Validator was flagging that `` was in the image prefix, but did not repair the issue. + + +___ + +
+ + +
+Maya: Improve error feedback when no renderable cameras exist for ASS family. #5092 + +When collecting cameras for `ass` family, this improves the error message when no cameras are renderable. + + +___ + +
+ + +
+Nuke: Custom script to set frame range of read nodes #5039 + +Adding option to set frame range specifically for the read nodes in Openpype Panel. User can set up their preferred frame range with the frame range dialog, which can be showed after clicking `Set Frame Range (Read Node)` in Openpype Tools + + +___ + +
+ + +
+Update extract review letterbox docs #5074 + +Update Extract Review - Letter Box section in Docs. Letterbox type description is removed. + + +___ + +
+ + +
+Project pack: Documents only skips roots validation #5082 + +Single roots validation is skipped if only documents are extracted. + + +___ + +
+ + +
+Nuke: custom settings for write node without publish #5084 + +Set Render Output and other settings to write nodes for non-publish purposes. + + +___ + +
+ +### **🐛 Bug fixes** + + +
+Maya: Deadline servers #5052 + +Fix working with multiple Deadline servers in Maya. +- Pools (primary and secondary) attributes were not recreated correctly. +- Order of collector plugins were wrong, so collected data was not injected into render instances. +- Server attribute was not converted to string so comparing with settings was incorrect. +- Improve debug logging for where the webservice url is getting fetched from. + + +___ + +
+ + +
+Maya: Fix Load Reference. #5091 + +Fix bug introduced with https://github.com/ynput/OpenPype/pull/4751 where `cmds.ls` returns a list. + + +___ + +
+ + +
+3dsmax: Publishing Deadline jobs from RedShift #4960 + +Fix the bug of being uable to publish deadline jobs from RedshiftUse Current File instead of Published Scene for just Redshift. +- add save scene before rendering to ensure the scene is saved after the modification. +- add separated aov files option to allow users to choose to have aovs in render output +- add validator for render publish to aovid overriding the previous renders + + +___ + +
+ + +
+Houdini: Fix missing frame range for pointcache and camera exports #5026 + +Fix missing frame range for pointcache and camera exports on published version. + + +___ + +
+ + +
+Global: collect_frame_fix plugin fix and cleanup #5064 + +Previous implementation https://github.com/ynput/OpenPype/pull/5036 was broken this is fixing the issue where attribute is found in instance data although the settings were disabled for the plugin. + + +___ + +
+ + +
+Hiero: Fix apply settings Clip Load #5073 + +Changed `apply_settings` to classmethod which fixes the issue with settings. + + +___ + +
+ + +
+Resolve: Make sure scripts dir exists #5078 + +Make sure the scripts directory exists before looping over it's content. + + +___ + +
+ + +
+removing info knob from nuke creators #5083 + +- removing instance node if removed via publisher +- removing info knob since it is not needed any more (was there only for the transition phase) + + +___ + +
+ + +
+Tray: Fix restart arguments on update #5085 + +Fix arguments on restart. + + +___ + +
+ + +
+Maya: bug fix on repair action in Arnold Scene Source CBID Validator #5096 + +Fix the bug of not being able to use repair action in Arnold Scene Source CBID Validator + + +___ + +
+ + +
+Nuke: batch of small fixes #5103 + +- default settings for `imageio.requiredNodes` **CreateWriteImage** +- default settings for **LoadImage** representations +- **Create** and **Publish** menu items with `parent=main_window` (version > 14) + + +___ + +
+ + +
+Deadline: make prerender check safer #5104 + +Prerender wasn't correctly recognized and was replaced with just 'render' family.In Nuke it is correctly `prerender.farm` in families, which wasn't handled here. It resulted into using `render` in templates even if `render` and `prerender` templates were split. + + +___ + +
+ + +
+General: Sort launcher actions alphabetically #5106 + +The launcher actions weren't being sorted by its label but its name (which on the case of the apps it's the version number) and thus the order wasn't consistent and we kept getting a different order on every launch. From my debugging session, this was the result of what the `actions` variable held after the `filter_compatible_actions` function before these changes: +``` +(Pdb) for p in actions: print(p.order, p.name) +0 14-02 +0 14-02 +0 14-02 +0 14-02 +0 14-02 +0 19-5-493 +0 2023 +0 3-41 +0 6-01 +```This caused already a couple bugs from our artists thinking they had launched Nuke X and instead launched Nuke and telling us their Nuke was missing nodes**Before:****After:** + + +___ + +
+ + +
+TrayPublisher: Editorial video stream discovery #5120 + +Editorial create plugin in traypublisher does not expect that first stream in input is video. + + +___ + +
+ +### **🔀 Refactored code** + + +
+3dsmax: Move from deprecated interface #5117 + +`INewPublisher` interface is deprecated, this PR is changing the use to `IPublishHost` instead. + + +___ + +
+ +### **Merged pull requests** + + +
+add movalex as a contributor for code #5076 + +Adds @movalex as a contributor for code. + +This was requested by mkolar [in this comment](https://github.com/ynput/OpenPype/pull/4916#issuecomment-1571498425) + +[skip ci] +___ + +
+ + +
+3dsmax: refactor load plugins #5079 + + +___ + +
+ + + + ## [3.15.9](https://github.com/ynput/OpenPype/tree/3.15.9) diff --git a/openpype/version.py b/openpype/version.py index 868664c601..cf4e1efc66 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.15.10-nightly.2" +__version__ = "3.15.10" diff --git a/pyproject.toml b/pyproject.toml index 633899d3a0..56c130982c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "OpenPype" -version = "3.15.9" # OpenPype +version = "3.15.10" # OpenPype description = "Open VFX and Animation pipeline with support." authors = ["OpenPype Team "] license = "MIT License" From 333249b4d8ee32116851c6aabad25a9bc29cac16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 9 Jun 2023 15:29:28 +0000 Subject: [PATCH 71/76] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e614d2fa65..aa5a99f66e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.15.10 - 3.15.10-nightly.2 - 3.15.10-nightly.1 - 3.15.9 @@ -134,7 +135,6 @@ body: - 3.14.3-nightly.4 - 3.14.3-nightly.3 - 3.14.3-nightly.2 - - 3.14.3-nightly.1 validations: required: true - type: dropdown From 54294abb49e1e1b215aad6d07c3fa50000ccf52a Mon Sep 17 00:00:00 2001 From: Ynbot Date: Sat, 10 Jun 2023 03:25:04 +0000 Subject: [PATCH 72/76] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index cf4e1efc66..300f5546ae 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.15.10" +__version__ = "3.15.11-nightly.1" From 6f0c5083d310af4291ce14e87dde80dff479fa5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 10 Jun 2023 03:25:49 +0000 Subject: [PATCH 73/76] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index aa5a99f66e..0b1d0f5087 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.15.11-nightly.1 - 3.15.10 - 3.15.10-nightly.2 - 3.15.10-nightly.1 @@ -134,7 +135,6 @@ body: - 3.14.3-nightly.5 - 3.14.3-nightly.4 - 3.14.3-nightly.3 - - 3.14.3-nightly.2 validations: required: true - type: dropdown From 74efe431765272ff640b6478b15ac06e03a5e0a4 Mon Sep 17 00:00:00 2001 From: Alexey Bogomolov Date: Tue, 13 Jun 2023 10:03:05 +0300 Subject: [PATCH 74/76] hide macos dock icon on build --- tools/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build.sh b/tools/build.sh index 753a9c55b8..e828cc149e 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -196,6 +196,8 @@ if [ "$disable_submodule_update" == 1 ]; then echo -e "${BIGreen}>>>${RST} Fixing libs ..." mv "$openpype_root/build/OpenPype $openpype_version.app/Contents/MacOS/dependencies/cx_Freeze" "$openpype_root/build/OpenPype $openpype_version.app/Contents/MacOS/lib/" || { echo -e "${BIRed}!!!>${RST} ${BIYellow}Can't move cx_Freeze libs${RST}"; return 1; } + # force hide icon from Dock + defaults write "$openpype_root/build/OpenPype $openpype_version.app/Contents/Info" LSUIElement 1 # fix code signing issue echo -e "${BIGreen}>>>${RST} Fixing code signatures ...\c" From 1c77dffc3d45e6ec7a8876b2f19eac572eb04cab Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 14 Jun 2023 03:25:23 +0000 Subject: [PATCH 75/76] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index 300f5546ae..c44b1d29fb 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.15.11-nightly.1" +__version__ = "3.15.11-nightly.2" From fa9d348b321abfc4efa94065925055212dd8e8b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 14 Jun 2023 03:26:11 +0000 Subject: [PATCH 76/76] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0b1d0f5087..2339ec878f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.15.11-nightly.2 - 3.15.11-nightly.1 - 3.15.10 - 3.15.10-nightly.2 @@ -134,7 +135,6 @@ body: - 3.14.3-nightly.6 - 3.14.3-nightly.5 - 3.14.3-nightly.4 - - 3.14.3-nightly.3 validations: required: true - type: dropdown