diff --git a/pype/settings/defaults/project_anatomy/colorspace.json b/pype/settings/defaults/project_anatomy/colorspace.json deleted file mode 100644 index 8b934f810d..0000000000 --- a/pype/settings/defaults/project_anatomy/colorspace.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "nuke": { - "root": { - "colorManagement": "Nuke", - "OCIO_config": "nuke-default", - "defaultViewerLUT": "Nuke Root LUTs", - "monitorLut": "sRGB", - "int8Lut": "sRGB", - "int16Lut": "sRGB", - "logLut": "Cineon", - "floatLut": "linear" - }, - "viewer": { - "viewerProcess": "sRGB" - }, - "write": { - "render": { - "colorspace": "linear" - }, - "prerender": { - "colorspace": "linear" - }, - "still": { - "colorspace": "sRGB" - } - }, - "read": { - "[^-a-zA-Z0-9]beauty[^-a-zA-Z0-9]": "linear", - "[^-a-zA-Z0-9](P|N|Z|crypto)[^-a-zA-Z0-9]": "linear", - "[^-a-zA-Z0-9](plateRef)[^-a-zA-Z0-9]": "sRGB" - } - }, - "maya": { - - }, - "houdini": { - - }, - "resolve": { - - } -} diff --git a/pype/settings/defaults/project_anatomy/imageio.json b/pype/settings/defaults/project_anatomy/imageio.json new file mode 100644 index 0000000000..98ded33370 --- /dev/null +++ b/pype/settings/defaults/project_anatomy/imageio.json @@ -0,0 +1,122 @@ +{ + "hiero": { + "workfile": { + "ocioConfigName": "nuke-default", + "ocioconfigpath": { + "windows": [], + "darwin": [], + "linux": [] + }, + "workingSpace": "linear", + "sixteenBitLut": "sRGB", + "eightBitLut": "sRGB", + "floatLut": "linear", + "logLut": "Cineon", + "viewerLut": "sRGB", + "thumbnailLut": "sRGB" + }, + "regexInputs": { + "inputs": [{ + "regex": "[^-a-zA-Z0-9](plateRef).*(?=mp4)", + "colorspace": "sRGB" + }] + } + }, + "nuke": { + "workfile": { + "colorManagement": "Nuke", + "OCIO_config": "nuke-default", + "customOCIOConfigPath": { + "windows": [], + "darwin": [], + "linux": [] + }, + "workingSpaceLUT": "linear", + "monitorLut": "sRGB", + "int8Lut": "sRGB", + "int16Lut": "sRGB", + "logLut": "Cineon", + "floatLut": "linear" + }, + "nodes": { + "requiredNodes": [{ + "plugins": [ + "CreateWriteRender" + ], + "nukeNodeClass": "Write", + "knobs": [{ + "name": "file_type", + "value": "exr" + }, + { + "name": "datatype", + "value": "16 bit half" + }, + { + "name": "compression", + "value": "Zip (1 scanline)" + }, + { + "name": "autocrop", + "value": "True" + }, + { + "name": "tile_color", + "value": "0xff0000ff" + }, + { + "name": "channels", + "value": "rgb" + }, + { + "name": "colorspace", + "value": "linear" + } + ] + }, + { + "plugins": [ + "CreateWritePrerender" + ], + "nukeNodeClass": "Write", + "knobs": [{ + "name": "file_type", + "value": "exr" + }, + { + "name": "datatype", + "value": "16 bit half" + }, + { + "name": "compression", + "value": "Zip (1 scanline)" + }, + { + "name": "autocrop", + "value": "False" + }, + { + "name": "tile_color", + "value": "0xff0000ff" + }, + { + "name": "channels", + "value": "rgb" + }, + { + "name": "colorspace", + "value": "linear" + } + ] + } + ], + "customNodes": [] + }, + "regexInputs": { + "inputs": [{ + "regex": "[^-a-zA-Z0-9]beauty[^-a-zA-Z0-9]", + "colorspace": "linear" + }] + } + } +} diff --git a/pype/tools/settings/settings/gui_schemas/projects_schema/0_project_gui_schema.json b/pype/tools/settings/settings/gui_schemas/projects_schema/0_project_gui_schema.json index bc9ec2dc9d..78f740e397 100644 --- a/pype/tools/settings/settings/gui_schemas/projects_schema/0_project_gui_schema.json +++ b/pype/tools/settings/settings/gui_schemas/projects_schema/0_project_gui_schema.json @@ -14,6 +14,9 @@ "type": "anatomy_templates", "key": "templates", "is_file": true + }, { + "type": "schema", + "name": "schema_anatomy_imageio" } ] }, { diff --git a/pype/tools/settings/settings/gui_schemas/projects_schema/schema_anatomy_imageio.json b/pype/tools/settings/settings/gui_schemas/projects_schema/schema_anatomy_imageio.json new file mode 100644 index 0000000000..f3de0dcb44 --- /dev/null +++ b/pype/tools/settings/settings/gui_schemas/projects_schema/schema_anatomy_imageio.json @@ -0,0 +1,289 @@ +{ + "type": "dict", + "key": "imageio", + "label": "Color Management and Output Formats", + "is_file": true, + "children": [{ + "key": "hiero", + "type": "dict", + "label": "Hiero", + "children": [{ + "key": "workfile", + "type": "dict", + "label": "Workfile", + "collapsable": false, + "children": [{ + "type": "form", + "children": [{ + "type": "enum", + "key": "ocioConfigName", + "label": "OpenColorIO Config", + "enum_items": [{ + "nuke-default": "nuke-default" + }, + { + "aces_1.0.3": "aces_1.0.3" + }, + { + "aces_1.1": "aces_1.1" + }, + { + "custom": "custom" + } + ] + }, { + "type": "path-widget", + "key": "ocioconfigpath", + "label": "Custom OCIO path", + "multiplatform": true, + "multipath": true + }, { + "type": "text", + "key": "workingSpace", + "label": "Working Space" + }, { + "type": "text", + "key": "sixteenBitLut", + "label": "16 Bit Files" + }, { + "type": "text", + "key": "eightBitLut", + "label": "8 Bit Files" + }, { + "type": "text", + "key": "floatLut", + "label": "Floating Point Files" + }, { + "type": "text", + "key": "logLut", + "label": "Log Files" + }, { + "type": "text", + "key": "viewerLut", + "label": "Viewer" + }, { + "type": "text", + "key": "thumbnailLut", + "label": "Thumbnails" + }] + }] + }, { + "key": "regexInputs", + "type": "dict", + "label": "Colorspace on Inputs by regex detection", + "collapsable": true, + "children": [{ + "type": "list", + "key": "inputs", + "label": "", + "object_type": { + "type": "dict", + "children": [{ + "type": "text", + "key": "regex", + "label": "Regex" + }, { + "type": "text", + "key": "colorspace", + "label": "Colorspace" + }] + } + }] + }] + }, { + "key": "nuke", + "type": "dict", + "label": "Nuke", + "children": [{ + "key": "workfile", + "type": "dict", + "label": "Workfile", + "collapsable": false, + "is_group": true, + "children": [{ + "type": "form", + "children": [{ + "type": "enum", + "key": "colorManagement", + "label": "color management", + "enum_items": [{ + "Nuke": "Nuke" + }, + { + "OCIO": "OCIO" + } + ] + }, { + "type": "enum", + "key": "OCIO_config", + "label": "OpenColorIO Config", + "enum_items": [{ + "nuke-default": "nuke-default" + }, + { + "spi-vfx": "spi-vfx" + }, + { + "spi-anim": "spi-anim" + }, + { + "aces_1.0.3": "aces_0.1.1" + }, + { + "aces_1.0.3": "aces_0.7.1" + }, + { + "aces_1.0.3": "aces_1.0.1" + }, + { + "aces_1.0.3": "aces_1.0.3" + }, + { + "aces_1.1": "aces_1.1" + }, + { + "custom": "custom" + } + ] + }, { + "type": "path-widget", + "key": "customOCIOConfigPath", + "label": "Custom OCIO config path", + "multiplatform": true, + "multipath": true + }, { + "type": "text", + "key": "workingSpaceLUT", + "label": "Working Space" + }, { + "type": "text", + "key": "monitorLut", + "label": "monitor" + }, { + "type": "text", + "key": "int8Lut", + "label": "8-bit files" + }, { + "type": "text", + "key": "int16Lut", + "label": "16-bit files" + }, { + "type": "text", + "key": "logLut", + "label": "log files" + }, { + "type": "text", + "key": "floatLut", + "label": "float files" + }] + }] + }, { + "key": "nodes", + "type": "dict", + "label": "Nodes", + "collapsable": true, + "is_group": true, + "children": [{ + "key": "requiredNodes", + "type": "list", + "label": "Required Nodes", + "object_type": { + "type": "dict", + "children": [{ + "type": "list", + "key": "plugins", + "label": "Used in plugins", + "object_type": { + "type": "text", + "key": "pluginClass", + "label": "Plugin Class" + } + }, { + "type": "text", + "key": "nukeNodeClass", + "label": "Nuke Node Class" + }, { + "type": "splitter" + }, { + "key": "knobs", + "label": "Knobs", + "type": "list", + "object_type": { + "type": "dict", + "children": [{ + "type": "text", + "key": "name", + "label": "Name" + }, { + "type": "text", + "key": "value", + "label": "Value" + }] + } + }] + } + }, { + "type": "list", + "key": "customNodes", + "label": "Custom Nodes", + "object_type": { + "type": "dict", + "children": [{ + "type": "list", + "key": "plugins", + "label": "Used in plugins", + "object_type": { + "type": "text", + "key": "pluginClass", + "label": "Plugin Class" + } + }, { + "type": "text", + "key": "nukeNodeClass", + "label": "Nuke Node Class" + }, { + "type": "splitter" + }, { + "key": "knobs", + "label": "Knobs", + "type": "list", + "object_type": { + "type": "dict", + "children": [{ + "type": "text", + "key": "name", + "label": "Name" + }, { + "type": "text", + "key": "value", + "label": "Value" + }] + } + }] + } + }] + }, { + "key": "regexInputs", + "type": "dict", + "label": "Colorspace on Inputs by regex detection", + "collapsable": true, + "children": [{ + "type": "list", + "key": "inputs", + "label": "", + "object_type": { + "type": "dict", + "children": [{ + "type": "text", + "key": "regex", + "label": "Regex" + }, { + "type": "text", + "key": "colorspace", + "label": "Colorspace" + }] + } + }] + }] + }] +} diff --git a/pype/tools/settings/settings/gui_schemas/system_schema/example_schema.json b/pype/tools/settings/settings/gui_schemas/system_schema/example_schema.json index a3e7f52776..00595fd3e4 100644 --- a/pype/tools/settings/settings/gui_schemas/system_schema/example_schema.json +++ b/pype/tools/settings/settings/gui_schemas/system_schema/example_schema.json @@ -13,16 +13,16 @@ "type": "schema_template", "name": "example_template", "template_data": { - "host_label": "Maya 2019", - "host_name": "maya_2019", + "host_label": "Application 1", + "host_name": "app_1", "multipath_executables": false } }, { "type": "schema_template", "name": "example_template", "template_data": { - "host_label": "Maya 2020", - "host_name": "maya_2020" + "host_label": "Application 2", + "host_name": "app_2" } } ] diff --git a/pype/tools/settings/settings/widgets/anatomy_types.py b/pype/tools/settings/settings/widgets/anatomy_types.py index e1a726187c..ef89a802bc 100644 --- a/pype/tools/settings/settings/widgets/anatomy_types.py +++ b/pype/tools/settings/settings/widgets/anatomy_types.py @@ -1,7 +1,11 @@ from Qt import QtWidgets, QtCore from .widgets import ExpandingWidget from .item_types import ( - SettingObject, ModifiableDict, PathWidget, RawJsonWidget + SettingObject, + ModifiableDict, + PathWidget, + RawJsonWidget, + DictWidget ) from .lib import NOT_SET, TypeToKlass, CHILD_OFFSET, METADATA_KEY @@ -50,14 +54,18 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): children_data = input_data["children"] roots_input_data = {} templates_input_data = {} + imageio_input_data = {} for child in children_data: if child["type"] == "anatomy_roots": roots_input_data = child elif child["type"] == "anatomy_templates": templates_input_data = child + elif child["key"] == "imageio": + imageio_input_data = child self.root_widget = RootsWidget(roots_input_data, self) self.templates_widget = TemplatesWidget(templates_input_data, self) + self.imageio_widget = DictWidget(imageio_input_data, self) self.setAttribute(QtCore.Qt.WA_StyledBackground) @@ -75,6 +83,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): content_layout.addWidget(self.root_widget) content_layout.addWidget(self.templates_widget) + content_layout.addWidget(self.imageio_widget) body_widget.set_content_widget(content_widget) @@ -83,6 +92,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): self.root_widget.value_changed.connect(self._on_value_change) self.templates_widget.value_changed.connect(self._on_value_change) + self.imageio_widget.value_changed.connect(self._on_value_change) def update_default_values(self, parent_values): self._state = None @@ -95,6 +105,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): self.root_widget.update_default_values(value) self.templates_widget.update_default_values(value) + self.imageio_widget.update_default_values(value) def update_studio_values(self, parent_values): self._state = None @@ -107,6 +118,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): self.root_widget.update_studio_values(value) self.templates_widget.update_studio_values(value) + self.imageio_widget.update_studio_values(value) def apply_overrides(self, parent_values): # Make sure this is set to False @@ -119,6 +131,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): self.root_widget.apply_overrides(value) self.templates_widget.apply_overrides(value) + self.imageio_widget.apply_overrides(value) def set_value(self, value): raise TypeError("AnatomyWidget does not allow to use `set_value`") @@ -154,6 +167,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): def hierarchical_style_update(self): self.root_widget.hierarchical_style_update() self.templates_widget.hierarchical_style_update() + self.imageio_widget.hierarchical_style_update() self.update_style() @property @@ -161,6 +175,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): return ( self.root_widget.child_has_studio_override or self.templates_widget.child_has_studio_override + or self.imageio_widget.child_has_studio_override ) @property @@ -168,6 +183,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): return ( self.root_widget.child_modified or self.templates_widget.child_modified + or self.imageio_widget.child_modified ) @property @@ -175,6 +191,7 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): return ( self.root_widget.child_overriden or self.templates_widget.child_overriden + or self.imageio_widget.child_overriden ) @property @@ -182,27 +199,33 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): return ( self.root_widget.child_invalid or self.templates_widget.child_invalid + or self.imageio_widget.child_invalid ) def set_as_overriden(self): self.root_widget.set_as_overriden() self.templates_widget.set_as_overriden() + self.imageio_widget.set_as_overriden() def remove_overrides(self): self.root_widget.remove_overrides() self.templates_widget.remove_overrides() + self.imageio_widget.remove_overrides() def reset_to_pype_default(self): self.root_widget.reset_to_pype_default() self.templates_widget.reset_to_pype_default() + self.imageio_widget.reset_to_pype_default() def set_studio_default(self): self.root_widget.set_studio_default() self.templates_widget.set_studio_default() + self.imageio_widget.set_studio_default() def discard_changes(self): self.root_widget.discard_changes() self.templates_widget.discard_changes() + self.imageio_widget.discard_changes() def overrides(self): if self.child_overriden: @@ -213,14 +236,20 @@ class AnatomyWidget(QtWidgets.QWidget, SettingObject): output = {} output.update(self.root_widget.config_value()) output.update(self.templates_widget.config_value()) + output.update(self.imageio_widget.config_value()) return output def studio_overrides(self): if ( self.root_widget.child_has_studio_override or self.templates_widget.child_has_studio_override + or self.imageio_widget.child_has_studio_override ): - groups = [self.root_widget.key, self.templates_widget.key] + groups = [ + self.root_widget.key, + self.templates_widget.key, + self.imageio_widget.key + ] value = self.config_value() value[self.key][METADATA_KEY] = {"groups": groups} return value, True diff --git a/pype/tools/settings/settings/widgets/base.py b/pype/tools/settings/settings/widgets/base.py index 3f842602ca..692de617df 100644 --- a/pype/tools/settings/settings/widgets/base.py +++ b/pype/tools/settings/settings/widgets/base.py @@ -795,7 +795,7 @@ class ProjectWidget(QtWidgets.QWidget): def _update_values(self): self.ignore_value_changes = True - default_values = default_values = lib.convert_data_to_gui_data( + default_values = lib.convert_data_to_gui_data( {"project": default_settings()} ) for input_field in self.input_fields: