From 5deb8d8efe83c3844f452fd97e4ae786d0d390c0 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 23 Feb 2021 18:17:50 +0100 Subject: [PATCH 1/8] add maya validators to settings --- ...idden.py => validate_rig_joints_hidden.py} | 3 +- .../entities/dict_immutable_keys_entity.py | 2 +- .../schemas/schema_maya_publish.json | 326 +++++++++++------- .../schemas/template_simple_plugin.json | 30 ++ 4 files changed, 237 insertions(+), 124 deletions(-) rename pype/hosts/maya/plugins/publish/{validate_joints_hidden.py => validate_rig_joints_hidden.py} (93%) create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json diff --git a/pype/hosts/maya/plugins/publish/validate_joints_hidden.py b/pype/hosts/maya/plugins/publish/validate_rig_joints_hidden.py similarity index 93% rename from pype/hosts/maya/plugins/publish/validate_joints_hidden.py rename to pype/hosts/maya/plugins/publish/validate_rig_joints_hidden.py index 61dfcd563d..a102df50de 100644 --- a/pype/hosts/maya/plugins/publish/validate_joints_hidden.py +++ b/pype/hosts/maya/plugins/publish/validate_rig_joints_hidden.py @@ -6,7 +6,7 @@ import pype.hosts.maya.api.action from pype.hosts.maya.api import lib -class ValidateJointsHidden(pyblish.api.InstancePlugin): +class ValidateRigJointsHidden(pyblish.api.InstancePlugin): """Validate all joints are hidden visually. This includes being hidden: @@ -20,7 +20,6 @@ class ValidateJointsHidden(pyblish.api.InstancePlugin): order = pype.api.ValidateContentsOrder hosts = ['maya'] families = ['rig'] - category = 'rig' version = (0, 1, 0) label = "Joints Hidden" actions = [pype.hosts.maya.api.action.SelectInvalidAction, diff --git a/pype/settings/entities/dict_immutable_keys_entity.py b/pype/settings/entities/dict_immutable_keys_entity.py index 854c904f3c..0e6a98bdde 100644 --- a/pype/settings/entities/dict_immutable_keys_entity.py +++ b/pype/settings/entities/dict_immutable_keys_entity.py @@ -130,7 +130,7 @@ class DictImmutableKeysEntity(ItemEntity): continue if child_obj.key in self.non_gui_children: - raise SchemaDuplicatedKeys(self.path, child_obj.key) + raise SchemaDuplicatedKeys("", child_obj.key) self.non_gui_children[child_obj.key] = child_obj if not first: diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 0d705d3d02..6aeba9b8b2 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -21,135 +21,219 @@ } ] }, + { - "type": "splitter" - }, - { - "type": "label", - "label": "Collectors" - }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateCameraAttributes", - "label": "Validate Camera Attributes", - "checkbox_key": "enabled", + "type": "collapsible-wrap", + "label": "Validators", "children": [ { - "type": "boolean", - "key": "enabled", - "label": "Enabled" + "type": "dict", + "collapsible": true, + "key": "ValidateShaderName", + "label": "ValidateShaderName", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "label", + "label": "Shader name regex can use named capture group asset to validate against current asset name.

Example:
^.*(?P=<asset>.+)_SHD

" + }, + { + "type": "text", + "key": "regex", + "label": "Validation regex" + } + ] + }, + + { + "type": "dict", + "collapsible": true, + "key": "ValidateAttributes", + "label": "ValidateAttributes", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "attributes", + "label": "Attributes" + } + ] }, { - "type": "boolean", - "key": "optional", - "label": "Optional" + "type": "collapsible-wrap", + "label": "Model", + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "ValidateModelName", + "label": "Validate Model Name", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "label", + "label": "Path to material file defining list of material names to check. This is material name per line simple text file.
It will be checked against named group shader in your Validation regex.

For example:
^.*(?P=<shader>.+)_GEO

" + }, + { + "type": "path-widget", + "key": "material_file", + "label": "Material File", + "multiplatform": true, + "multipath": false + }, + { + "type": "text", + "key": "regex", + "label": "Validation regex" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "ValidateTransformNamingSuffix", + "label": "ValidateTransformNamingSuffix", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "label", + "label": "Validates transform suffix based on the type of its children shapes." + }, + { + "type": "raw-json", + "key": "SUFFIX_NAMING_TABLE", + "label": "Suffix Naming Table" + }, + { + "type": "boolean", + "key": "ALLOW_IF_NOT_IN_SUFFIX_TABLE", + "label": "Allow if suffix not in table" + } + ] + }, + { + "type": "schema_template", + "name": "template_simple_plugin", + "template_data": [ + { + "key": "ValidateColorSets", + "label": "ValidateColorSets" + }, + { + "key": "ValidateMeshHasOverlappingUVs", + "label": "ValidateMeshHasOverlappingUVs" + }, + { + "key": "ValidateMeshArnoldAttributes", + "label": "ValidateMeshArnoldAttributes" + }, + { + "key": "ValidateMeshShaderConnections", + "label": "ValidateMeshShaderConnections" + }, + { + "key": "ValidateMeshSingleUVSet", + "label": "ValidateMeshSingleUVSet" + }, + { + "key": "ValidateMeshHasUVs", + "label": "ValidateMeshHasUVs" + }, + { + "key": "ValidateMeshLaminaFaces", + "label": "ValidateMeshLaminaFaces" + }, + { + "key": "ValidateMeshNonManifold", + "label": "ValidateMeshNonManifold" + }, + { + "key": "ValidateMeshUVSetMap1", + "label": "ValidateMeshUVSetMap1", + "docstring": "Validate model's default uv set exists and is named 'map1'.

In Maya meshes by default have a uv set named 'map1' that cannot be deleted. It can be renamed, however,
introducing some issues with some renderers. As such we ensure the first (default) UV set index is named 'map1'." + }, + { + "key": "ValidateMeshVerticesHaveEdges", + "label": "ValidateMeshVerticesHaveEdges" + }, + { + "key": "ValidateNoAnimation", + "label": "ValidateNoAnimation", + "docstring": "Ensure no keyframes on nodes in the Instance.
Even though a Model would extract without animCurves correctly this avoids getting different
output from a model when extracted from a different frame than the first frame. (Might be overly restrictive though)." + }, + { + "key": "ValidateNoNamespace", + "label": "ValidateNoNamespace" + }, + { + "key": "ValidateNoNullTransforms", + "label": "ValidateNoNullTransforms" + }, + { + "key": "ValidateNoUnknownNodes", + "label": "ValidateNoUnknownNodes" + }, + { + "key": "ValidateNodeNoGhosting", + "label": "ValidateNodeNoGhosting" + }, + { + "key": "ValidateShapeDefaultNames", + "label": "ValidateShapeDefaultNames" + }, + { + "key": "ValidateShapeRenderStats", + "label": "ValidateShapeRenderStats" + }, + { + "key": "ValidateTransformZero", + "label": "ValidateTransformZero" + } + ] + } + ] + }, + { + "type": "schema_template", + "name": "template_simple_plugin", + "template_data": [ + { + "key": "ValidateCameraAttributes", + "label": "Validate Camera Attributes", + "docstring": "" + }, + { + "key": "ValidateAssemblyName", + "label": "Validate Assembly Name" + }, + { + "key": "ValidateAssRelativePaths", + "label": "ValidateAssRelativePaths" + } + ] } ] }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateModelName", - "label": "Validate Model Name", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "label", - "label": "Path to material file defining list of material names to check. This is material name per line simple text file.
It will be checked against named group shader in your Validation regex.

For example:
^.*(?P=<shader>.+)_GEO

" - }, - { - "type": "path-widget", - "key": "material_file", - "label": "Material File", - "multiplatform": true, - "multipath": false - }, - { - "type": "text", - "key": "regex", - "label": "Validation regex" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateAssemblyName", - "label": "Validate Assembly Name", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateShaderName", - "label": "ValidateShaderName", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "label", - "label": "Shader name regex can use named capture group asset to validate against current asset name.

Example:
^.*(?P=<asset>.+)_SHD

" - }, - { - "type": "text", - "key": "regex", - "label": "Validation regex" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateMeshHasOverlappingUVs", - "label": "ValidateMeshHasOverlappingUVs", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ValidateAttributes", - "label": "ValidateAttributes", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "attributes", - "label": "Attributes" - } - ] - }, - { - "type": "splitter" - }, { "type": "label", "label": "Extractors" diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json b/pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json new file mode 100644 index 0000000000..88151f7534 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json @@ -0,0 +1,30 @@ +[ + { + "__default_values__": { + "docstring": "" + } + }, + { + "type": "dict", + "collapsible": true, + "key": "{key}", + "label": "{label}", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "label", + "label": "{docstring}" + } + ] + } +] \ No newline at end of file From b6a16de3c5f7c21a2255032e978c42c0e2875932 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 23 Feb 2021 18:35:52 +0100 Subject: [PATCH 2/8] save maya validator defaults --- .../plugins/publish/validate_model_name.py | 1 - .../plugins/publish/validate_shader_name.py | 1 - .../validate_transform_naming_suffix.py | 12 +- .../defaults/project_settings/maya.json | 124 ++++++++++++++++-- 4 files changed, 117 insertions(+), 21 deletions(-) diff --git a/pype/hosts/maya/plugins/publish/validate_model_name.py b/pype/hosts/maya/plugins/publish/validate_model_name.py index f0004dc81e..2f1586538e 100644 --- a/pype/hosts/maya/plugins/publish/validate_model_name.py +++ b/pype/hosts/maya/plugins/publish/validate_model_name.py @@ -22,7 +22,6 @@ class ValidateModelName(pyblish.api.InstancePlugin): # path to shader names definitions # TODO: move it to preset file material_file = None - active = False regex = '(.*)_(\\d)*_(.*)_(GEO)' @classmethod diff --git a/pype/hosts/maya/plugins/publish/validate_shader_name.py b/pype/hosts/maya/plugins/publish/validate_shader_name.py index 4a42ec6e35..a2951d5551 100644 --- a/pype/hosts/maya/plugins/publish/validate_shader_name.py +++ b/pype/hosts/maya/plugins/publish/validate_shader_name.py @@ -13,7 +13,6 @@ class ValidateShaderName(pyblish.api.InstancePlugin): """ optional = True - active = False order = pype.api.ValidateContentsOrder families = ["look"] hosts = ['maya'] diff --git a/pype/hosts/maya/plugins/publish/validate_transform_naming_suffix.py b/pype/hosts/maya/plugins/publish/validate_transform_naming_suffix.py index 14d4e7d5c8..bd290c73c7 100644 --- a/pype/hosts/maya/plugins/publish/validate_transform_naming_suffix.py +++ b/pype/hosts/maya/plugins/publish/validate_transform_naming_suffix.py @@ -35,11 +35,11 @@ class ValidateTransformNamingSuffix(pyblish.api.InstancePlugin): version = (0, 1, 0) label = 'Suffix Naming Conventions' actions = [pype.hosts.maya.api.action.SelectInvalidAction] - SUFFIX_NAMING_TABLE = {'mesh': ["_GEO", "_GES", "_GEP", "_OSD"], - 'nurbsCurve': ["_CRV"], - 'nurbsSurface': ["_NRB"], - 'locator': ["_LOC"], - None: ['_GRP']} + SUFFIX_NAMING_TABLE = {"mesh": ["_GEO", "_GES", "_GEP", "_OSD"], + "nurbsCurve": ["_CRV"], + "nurbsSurface": ["_NRB"], + "locator": ["_LOC"], + "group": ["_GRP"]} ALLOW_IF_NOT_IN_SUFFIX_TABLE = True @@ -88,7 +88,7 @@ class ValidateTransformNamingSuffix(pyblish.api.InstancePlugin): fullPath=True, noIntermediate=True) - shape_type = cmds.nodeType(shapes[0]) if shapes else None + shape_type = cmds.nodeType(shapes[0]) if shapes else "group" if not cls.is_valid_name(transform, shape_type, cls.SUFFIX_NAMING_TABLE, cls.ALLOW_IF_NOT_IN_SUFFIX_TABLE): diff --git a/pype/settings/defaults/project_settings/maya.json b/pype/settings/defaults/project_settings/maya.json index 2307fd8b82..affc6622df 100644 --- a/pype/settings/defaults/project_settings/maya.json +++ b/pype/settings/defaults/project_settings/maya.json @@ -112,32 +112,130 @@ "CollectMayaRender": { "sync_workfile_version": false }, - "ValidateCameraAttributes": { + "ValidateShaderName": { "enabled": false, - "optional": true + "regex": "(?P.*)_(.*)_SHD" + }, + "ValidateAttributes": { + "enabled": false, + "attributes": {} }, "ValidateModelName": { - "enabled": true, + "enabled": false, "material_file": { "windows": "", "darwin": "", "linux": "" }, - "regex": "" + "regex": "(.*)_(\\\\d)*_(.*)_(GEO)" }, - "ValidateAssemblyName": { - "enabled": true - }, - "ValidateShaderName": { + "ValidateTransformNamingSuffix": { "enabled": true, - "regex": "" + "SUFFIX_NAMING_TABLE": { + "mesh": [ + "_GEO", + "_GES", + "_GEP", + "_OSD" + ], + "nurbsCurve": [ + "_CRV" + ], + "nurbsSurface": [ + "_NRB" + ], + "locator": [ + "_LOC" + ], + "group": [ + "_GRP" + ] + }, + "ALLOW_IF_NOT_IN_SUFFIX_TABLE": true + }, + "ValidateColorSets": { + "enabled": false, + "optional": true }, "ValidateMeshHasOverlappingUVs": { - "enabled": false - }, - "ValidateAttributes": { "enabled": false, - "attributes": {} + "optional": true + }, + "ValidateMeshArnoldAttributes": { + "enabled": false, + "optional": true + }, + "ValidateMeshShaderConnections": { + "enabled": true, + "optional": true + }, + "ValidateMeshSingleUVSet": { + "enabled": false, + "optional": true + }, + "ValidateMeshHasUVs": { + "enabled": true, + "optional": true + }, + "ValidateMeshLaminaFaces": { + "enabled": false, + "optional": true + }, + "ValidateMeshNonManifold": { + "enabled": false, + "optional": true + }, + "ValidateMeshUVSetMap1": { + "enabled": false, + "optional": true + }, + "ValidateMeshVerticesHaveEdges": { + "enabled": true, + "optional": true + }, + "ValidateNoAnimation": { + "enabled": false, + "optional": true + }, + "ValidateNoNamespace": { + "enabled": true, + "optional": true + }, + "ValidateNoNullTransforms": { + "enabled": true, + "optional": true + }, + "ValidateNoUnknownNodes": { + "enabled": true, + "optional": true + }, + "ValidateNodeNoGhosting": { + "enabled": false, + "optional": true + }, + "ValidateShapeDefaultNames": { + "enabled": false, + "optional": true + }, + "ValidateShapeRenderStats": { + "enabled": false, + "optional": true + }, + "ValidateTransformZero": { + "enabled": true, + "optional": true + }, + "ValidateCameraAttributes": { + "enabled": false, + "optional": true + }, + "ValidateAssemblyName": { + "enabled": true, + "optional": true + }, + "ValidateAssRelativePaths": { + "enabled": true, + "optional": true }, "ExtractCameraAlembic": { "enabled": true, From 88ad9cea207d4b54aa892183debb26b2e96cdbf9 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 23 Feb 2021 19:15:34 +0100 Subject: [PATCH 3/8] add maya loader and creator settings --- .../defaults/project_settings/maya.json | 149 ++- .../projects_schema/schema_project_maya.json | 4 + .../schemas/schema_maya_capture.json | 1144 ++++++++--------- .../schemas/schema_maya_create.json | 86 ++ .../schemas/schema_maya_load.json | 26 + .../schemas/schema_maya_publish.json | 4 +- .../schemas/template_create_plugin.json | 22 + .../schemas/template_loader_plugin.json | 22 + ...ugin.json => template_publish_plugin.json} | 0 9 files changed, 875 insertions(+), 582 deletions(-) create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/template_create_plugin.json create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/template_loader_plugin.json rename pype/settings/entities/schemas/projects_schema/schemas/{template_simple_plugin.json => template_publish_plugin.json} (100%) diff --git a/pype/settings/defaults/project_settings/maya.json b/pype/settings/defaults/project_settings/maya.json index affc6622df..03955732d2 100644 --- a/pype/settings/defaults/project_settings/maya.json +++ b/pype/settings/defaults/project_settings/maya.json @@ -107,7 +107,121 @@ "overscan": 1.0 } }, - "ext_mapping": {}, + "create": { + "CreateAnimation": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateAss": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateAssembly": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateCamera": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateLayout": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateLook": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateMayaScene": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateModel": { + "enabled": true, + "defaults": [ + "Main", + "Proxy", + "Sculpt" + ] + }, + "CreatePointCache": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateRender": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateRenderSetup": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateReview": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateRig": { + "enabled": true, + "defaults": [ + "Main", + "Sim", + "Cloth" + ] + }, + "CreateSetDress": { + "enabled": true, + "defaults": [ + "Main", + "Anim" + ] + }, + "CreateUnrealStaticMesh": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateVrayProxy": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateVRayScene": { + "enabled": true, + "defaults": [ + "Main" + ] + }, + "CreateYetiRig": { + "enabled": true, + "defaults": [ + "Main" + ] + } + }, "publish": { "CollectMayaRender": { "sync_workfile_version": false @@ -319,6 +433,39 @@ 0.8, 0.5 ] + }, + "ReferenceLoader": { + "enabled": true, + "representations": [ + "ma", + "mb", + "abc", + "fbx" + ] + }, + "AudioLoader": { + "enabled": true, + "representations": [ + "wav" + ] + }, + "GpuCacheLoader": { + "enabled": true, + "representations": [ + "abc" + ] + }, + "ImagePlaneLoader": { + "enabled": true, + "representations": [ + "jpg", + "png", + "mov" + ] + }, + "MatchmoveLoader": { + "enabled": true, + "representations": [] } }, "workfile_build": { diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_maya.json b/pype/settings/entities/schemas/projects_schema/schema_project_maya.json index 5ba5de1557..7a270b0046 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -9,6 +9,10 @@ "type": "schema", "name": "schema_maya_capture" }, + { + "type": "schema", + "name": "schema_maya_create" + }, { "type": "schema", "name": "schema_maya_publish" diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 648fca28e6..4745a19075 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -1,595 +1,581 @@ { - "type": "collapsible-wrap", - "label": "Collapsible Wrapper without key", + "type": "dict", + "collapsible": true, + "key": "capture", + "label": "Maya Playblast settings", + "is_file": true, "children": [ { "type": "dict", - "collapsible": true, - "key": "capture", - "label": "Maya Playblast settings", - "is_file": true, + "key": "Codec", "children": [ { - "type": "dict", - "key": "Codec", - "children": [ - { - "type": "label", - "label": "Codec" - }, - { - "type": "text", - "key": "compression", - "label": "Compression type" - }, - { - "type": "text", - "key": "format", - "label": "Data format" - }, - { - "type": "number", - "key": "quality", - "label": "Quality", - "decimal": 0, - "minimum": 0, - "maximum": 100 - }, + "type": "label", + "label": "Codec" + }, + { + "type": "text", + "key": "compression", + "label": "Compression type" + }, + { + "type": "text", + "key": "format", + "label": "Data format" + }, + { + "type": "number", + "key": "quality", + "label": "Quality", + "decimal": 0, + "minimum": 0, + "maximum": 100 + }, - { - "type": "splitter" - } - ] - }, - { - "type": "dict", - "key": "Display Options", - "children": [ - { - "type": "label", - "label": "Display Options" - }, - { - "type": "list-strict", - "key": "background", - "label": "Background Color: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundBottom", - "label": "Background Bottom: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundTop", - "label": "Background Top: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "boolean", - "key": "override_display", - "label": "Override display options" - } - ] - }, { "type": "splitter" - }, - { - "type": "dict", - "key": "Generic", - "children": [ - { - "type": "label", - "label": "Generic" - }, - { - "type": "boolean", - "key": "isolate_view", - "label": " Isolate view" - }, - { - "type": "boolean", - "key": "off_screen", - "label": " Off Screen" - } - ] - }, - { - "type": "dict", - "key": "IO", - "children": [ - { - "type": "label", - "label": "IO" - }, - { - "type": "text", - "key": "name", - "label": "Name" - }, - { - "type": "boolean", - "key": "open_finished", - "label": "Open finished" - }, - { - "type": "boolean", - "key": "raw_frame_numbers", - "label": "Raw frame numbers" - }, - { - "type": "list", - "key": "recent_playblasts", - "label": "Recent Playblasts", - "object_type": "text" - }, - { - "type": "boolean", - "key": "save_file", - "label": "Save file" - } - ] - }, - { - "type": "dict", - "key": "PanZoom", - "children": [ - { - "type": "boolean", - "key": "pan_zoom", - "label": " Pan Zoom" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Renderer", - "children": [ - { - "type": "label", - "label": "Renderer" - }, - { - "type": "text", - "key": "rendererName", - "label": " Renderer name" - } - ] - }, - { - "type": "dict", - "key": "Resolution", - "children": [ - { - "type": "splitter" - }, - { - "type": "label", - "label": "Resolution" - }, - { - "type": "number", - "key": "width", - "label": " Width", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "height", - "label": "Height", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "percent", - "label": "percent", - "decimal": 1, - "minimum": 0, - "maximum": 200 - }, - { - "type": "text", - "key": "mode", - "label": "Mode" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Time Range", - "children": [ - { - "type": "label", - "label": "Time Range" - }, - { - "type": "number", - "key": "start_frame", - "label": " Start frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "number", - "key": "end_frame", - "label": "End frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "text", - "key": "frame", - "label": "Frame" - }, - { - "type": "text", - "key": "time", - "label": "Time" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "Viewport Options", - "label": "Viewport Options", - "children": [ - { - "type": "boolean", - "key": "cameras", - "label": "cameras" - }, - { - "type": "boolean", - "key": "clipGhosts", - "label": "clipGhosts" - }, - { - "type": "boolean", - "key": "controlVertices", - "label": "controlVertices" - }, - { - "type": "boolean", - "key": "deformers", - "label": "deformers" - }, - { - "type": "boolean", - "key": "dimensions", - "label": "dimensions" - }, - { - "type": "number", - "key": "displayLights", - "label": "displayLights", - "decimal": 0, - "minimum": 0, - "maximum": 10 - }, - { - "type": "boolean", - "key": "dynamicConstraints", - "label": "dynamicConstraints" - }, - { - "type": "boolean", - "key": "dynamics", - "label": "dynamics" - }, - { - "type": "boolean", - "key": "fluids", - "label": "fluids" - }, - { - "type": "boolean", - "key": "follicles", - "label": "follicles" - }, - { - "type": "boolean", - "key": "gpuCacheDisplayFilter", - "label": "gpuCacheDisplayFilter" - }, - { - "type": "boolean", - "key": "greasePencils", - "label": "greasePencils" - }, - { - "type": "boolean", - "key": "grid", - "label": "grid" - }, - { - "type": "boolean", - "key": "hairSystems", - "label": "hairSystems" - }, - { - "type": "boolean", - "key": "handles", - "label": "handles" - }, - { - "type": "boolean", - "key": "high_quality", - "label": "high_quality" - }, - { - "type": "boolean", - "key": "hud", - "label": "hud" - }, - { - "type": "boolean", - "key": "hulls", - "label": "hulls" - }, - { - "type": "boolean", - "key": "ikHandles", - "label": "ikHandles" - }, - { - "type": "boolean", - "key": "imagePlane", - "label": "imagePlane" - }, - { - "type": "boolean", - "key": "joints", - "label": "joints" - }, - { - "type": "boolean", - "key": "lights", - "label": "lights" - }, - { - "type": "boolean", - "key": "locators", - "label": "locators" - }, - { - "type": "boolean", - "key": "manipulators", - "label": "manipulators" - }, - { - "type": "boolean", - "key": "motionTrails", - "label": "motionTrails" - }, - { - "type": "boolean", - "key": "nCloths", - "label": "nCloths" - }, - { - "type": "boolean", - "key": "nParticles", - "label": "nParticles" - }, - { - "type": "boolean", - "key": "nRigids", - "label": "nRigids" - }, - { - "type": "boolean", - "key": "nurbsCurves", - "label": "nurbsCurves" - }, - { - "type": "boolean", - "key": "nurbsSurfaces", - "label": "nurbsSurfaces" - }, - { - "type": "boolean", - "key": "override_viewport_options", - "label": "override_viewport_options" - }, - { - "type": "boolean", - "key": "particleInstancers", - "label": "particleInstancers" - }, - { - "type": "boolean", - "key": "pivots", - "label": "pivots" - }, - { - "type": "boolean", - "key": "planes", - "label": "planes" - }, - { - "type": "boolean", - "key": "pluginShapes", - "label": "pluginShapes" - }, - { - "type": "boolean", - "key": "polymeshes", - "label": "polymeshes" - }, - { - "type": "boolean", - "key": "shadows", - "label": "shadows" - }, - { - "type": "boolean", - "key": "strokes", - "label": "strokes" - }, - { - "type": "boolean", - "key": "subdivSurfaces", - "label": "subdivSurfaces" - }, - { - "type": "boolean", - "key": "textures", - "label": "textures" - }, - { - "type": "boolean", - "key": "twoSidedLighting", - "label": "twoSidedLighting" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "Camera Options", - "label": "Camera Options", - "children": [ - { - "type": "boolean", - "key": "displayGateMask", - "label": "displayGateMask" - }, - { - "type": "boolean", - "key": "displayResolution", - "label": "displayResolution" - }, - { - "type": "boolean", - "key": "displayFilmGate", - "label": "displayFilmGate" - }, - { - "type": "boolean", - "key": "displayFieldChart", - "label": "displayFieldChart" - }, - { - "type": "boolean", - "key": "displaySafeAction", - "label": "displaySafeAction" - }, - { - "type": "boolean", - "key": "displaySafeTitle", - "label": "displaySafeTitle" - }, - { - "type": "boolean", - "key": "displayFilmPivot", - "label": "displayFilmPivot" - }, - { - "type": "boolean", - "key": "displayFilmOrigin", - "label": "displayFilmOrigin" - }, - { - "type": "number", - "key": "overscan", - "label": "overscan", - "decimal": 1, - "minimum": 0, - "maximum": 10 - } - ] } ] }, { - "type": "dict-modifiable", - "key": "ext_mapping", - "label": "Extension Mapping", - "object_type": { - "type": "text" - } + "type": "dict", + "key": "Display Options", + "children": [ + { + "type": "label", + "label": "Display Options" + }, + { + "type": "list-strict", + "key": "background", + "label": "Background Color: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "list-strict", + "key": "backgroundBottom", + "label": "Background Bottom: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "list-strict", + "key": "backgroundTop", + "label": "Background Top: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "boolean", + "key": "override_display", + "label": "Override display options" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Generic", + "children": [ + { + "type": "label", + "label": "Generic" + }, + { + "type": "boolean", + "key": "isolate_view", + "label": " Isolate view" + }, + { + "type": "boolean", + "key": "off_screen", + "label": " Off Screen" + } + ] + }, + { + "type": "dict", + "key": "IO", + "children": [ + { + "type": "label", + "label": "IO" + }, + { + "type": "text", + "key": "name", + "label": "Name" + }, + { + "type": "boolean", + "key": "open_finished", + "label": "Open finished" + }, + { + "type": "boolean", + "key": "raw_frame_numbers", + "label": "Raw frame numbers" + }, + { + "type": "list", + "key": "recent_playblasts", + "label": "Recent Playblasts", + "object_type": "text" + }, + { + "type": "boolean", + "key": "save_file", + "label": "Save file" + } + ] + }, + { + "type": "dict", + "key": "PanZoom", + "children": [ + { + "type": "boolean", + "key": "pan_zoom", + "label": " Pan Zoom" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Renderer", + "children": [ + { + "type": "label", + "label": "Renderer" + }, + { + "type": "text", + "key": "rendererName", + "label": " Renderer name" + } + ] + }, + { + "type": "dict", + "key": "Resolution", + "children": [ + { + "type": "splitter" + }, + { + "type": "label", + "label": "Resolution" + }, + { + "type": "number", + "key": "width", + "label": " Width", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "height", + "label": "Height", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "percent", + "label": "percent", + "decimal": 1, + "minimum": 0, + "maximum": 200 + }, + { + "type": "text", + "key": "mode", + "label": "Mode" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Time Range", + "children": [ + { + "type": "label", + "label": "Time Range" + }, + { + "type": "number", + "key": "start_frame", + "label": " Start frame", + "decimal": 0, + "minimum": 0, + "maximum": 999999 + }, + { + "type": "number", + "key": "end_frame", + "label": "End frame", + "decimal": 0, + "minimum": 0, + "maximum": 999999 + }, + { + "type": "text", + "key": "frame", + "label": "Frame" + }, + { + "type": "text", + "key": "time", + "label": "Time" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "Viewport Options", + "label": "Viewport Options", + "children": [ + { + "type": "boolean", + "key": "cameras", + "label": "cameras" + }, + { + "type": "boolean", + "key": "clipGhosts", + "label": "clipGhosts" + }, + { + "type": "boolean", + "key": "controlVertices", + "label": "controlVertices" + }, + { + "type": "boolean", + "key": "deformers", + "label": "deformers" + }, + { + "type": "boolean", + "key": "dimensions", + "label": "dimensions" + }, + { + "type": "number", + "key": "displayLights", + "label": "displayLights", + "decimal": 0, + "minimum": 0, + "maximum": 10 + }, + { + "type": "boolean", + "key": "dynamicConstraints", + "label": "dynamicConstraints" + }, + { + "type": "boolean", + "key": "dynamics", + "label": "dynamics" + }, + { + "type": "boolean", + "key": "fluids", + "label": "fluids" + }, + { + "type": "boolean", + "key": "follicles", + "label": "follicles" + }, + { + "type": "boolean", + "key": "gpuCacheDisplayFilter", + "label": "gpuCacheDisplayFilter" + }, + { + "type": "boolean", + "key": "greasePencils", + "label": "greasePencils" + }, + { + "type": "boolean", + "key": "grid", + "label": "grid" + }, + { + "type": "boolean", + "key": "hairSystems", + "label": "hairSystems" + }, + { + "type": "boolean", + "key": "handles", + "label": "handles" + }, + { + "type": "boolean", + "key": "high_quality", + "label": "high_quality" + }, + { + "type": "boolean", + "key": "hud", + "label": "hud" + }, + { + "type": "boolean", + "key": "hulls", + "label": "hulls" + }, + { + "type": "boolean", + "key": "ikHandles", + "label": "ikHandles" + }, + { + "type": "boolean", + "key": "imagePlane", + "label": "imagePlane" + }, + { + "type": "boolean", + "key": "joints", + "label": "joints" + }, + { + "type": "boolean", + "key": "lights", + "label": "lights" + }, + { + "type": "boolean", + "key": "locators", + "label": "locators" + }, + { + "type": "boolean", + "key": "manipulators", + "label": "manipulators" + }, + { + "type": "boolean", + "key": "motionTrails", + "label": "motionTrails" + }, + { + "type": "boolean", + "key": "nCloths", + "label": "nCloths" + }, + { + "type": "boolean", + "key": "nParticles", + "label": "nParticles" + }, + { + "type": "boolean", + "key": "nRigids", + "label": "nRigids" + }, + { + "type": "boolean", + "key": "nurbsCurves", + "label": "nurbsCurves" + }, + { + "type": "boolean", + "key": "nurbsSurfaces", + "label": "nurbsSurfaces" + }, + { + "type": "boolean", + "key": "override_viewport_options", + "label": "override_viewport_options" + }, + { + "type": "boolean", + "key": "particleInstancers", + "label": "particleInstancers" + }, + { + "type": "boolean", + "key": "pivots", + "label": "pivots" + }, + { + "type": "boolean", + "key": "planes", + "label": "planes" + }, + { + "type": "boolean", + "key": "pluginShapes", + "label": "pluginShapes" + }, + { + "type": "boolean", + "key": "polymeshes", + "label": "polymeshes" + }, + { + "type": "boolean", + "key": "shadows", + "label": "shadows" + }, + { + "type": "boolean", + "key": "strokes", + "label": "strokes" + }, + { + "type": "boolean", + "key": "subdivSurfaces", + "label": "subdivSurfaces" + }, + { + "type": "boolean", + "key": "textures", + "label": "textures" + }, + { + "type": "boolean", + "key": "twoSidedLighting", + "label": "twoSidedLighting" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "Camera Options", + "label": "Camera Options", + "children": [ + { + "type": "boolean", + "key": "displayGateMask", + "label": "displayGateMask" + }, + { + "type": "boolean", + "key": "displayResolution", + "label": "displayResolution" + }, + { + "type": "boolean", + "key": "displayFilmGate", + "label": "displayFilmGate" + }, + { + "type": "boolean", + "key": "displayFieldChart", + "label": "displayFieldChart" + }, + { + "type": "boolean", + "key": "displaySafeAction", + "label": "displaySafeAction" + }, + { + "type": "boolean", + "key": "displaySafeTitle", + "label": "displaySafeTitle" + }, + { + "type": "boolean", + "key": "displayFilmPivot", + "label": "displayFilmPivot" + }, + { + "type": "boolean", + "key": "displayFilmOrigin", + "label": "displayFilmOrigin" + }, + { + "type": "number", + "key": "overscan", + "label": "overscan", + "decimal": 1, + "minimum": 0, + "maximum": 10 + } + ] } ] } diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json new file mode 100644 index 0000000000..575e04c85d --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json @@ -0,0 +1,86 @@ +{ + "type": "dict", + "collapsible": true, + "key": "create", + "label": "Creator plugins", + "children": [ + { + "type": "schema_template", + "name": "template_create_plugin", + "template_data": [ + { + "key": "CreateAnimation", + "label": "Create Animation" + }, + { + "key": "CreateAss", + "label": "Create Ass" + }, + { + "key": "CreateAssembly", + "label": "Create Assembly" + }, + { + "key": "CreateCamera", + "label": "Create Camera" + }, + { + "key": "CreateLayout", + "label": "Create Layout" + }, + { + "key": "CreateLook", + "label": "Create Look" + }, + { + "key": "CreateMayaScene", + "label": "Create Maya Scene" + }, + { + "key": "CreateModel", + "label": "Create Model" + }, + { + "key": "CreatePointCache", + "label": "Create Cache" + }, + { + "key": "CreateRender", + "label": "Create Render" + }, + { + "key": "CreateRenderSetup", + "label": "Create Render Setup" + }, + { + "key": "CreateReview", + "label": "Create Review" + }, + { + "key": "CreateRig", + "label": "Create Rig" + }, + { + "key": "CreateSetDress", + "label": "Create Set Dress" + }, + { + "key": "CreateUnrealStaticMesh", + "label": "Create Unreal - Static Mesh" + }, + { + "key": "CreateVrayProxy", + "label": "Create VRay Proxy" + }, + { + "key": "CreateVRayScene", + "label": "Create VRay Scene" + }, + { + "key": "CreateYetiRig", + "label": "Create Yeti Rig" + } + ] + } + ] +} diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index dd9d0508b4..3615c1477c 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -151,6 +151,32 @@ ] } ] + }, + { + "type": "schema_template", + "name": "template_loader_plugin", + "template_data": [ + { + "key": "ReferenceLoader", + "label": "Reference Loader" + }, + { + "key": "AudioLoader", + "label": "Audio Loader" + }, + { + "key": "GpuCacheLoader", + "label": "GpuCache Loader" + }, + { + "key": "ImagePlaneLoader", + "label": "Imageplane Loader" + }, + { + "key": "MatchmoveLoader", + "label": "Matchmove Loader" + } + ] } ] } diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 6aeba9b8b2..1d643b6273 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -133,7 +133,7 @@ }, { "type": "schema_template", - "name": "template_simple_plugin", + "name": "template_publish_plugin", "template_data": [ { "key": "ValidateColorSets", @@ -215,7 +215,7 @@ }, { "type": "schema_template", - "name": "template_simple_plugin", + "name": "template_publish_plugin", "template_data": [ { "key": "ValidateCameraAttributes", diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_create_plugin.json b/pype/settings/entities/schemas/projects_schema/schemas/template_create_plugin.json new file mode 100644 index 0000000000..14d15e7840 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/template_create_plugin.json @@ -0,0 +1,22 @@ +[ + { + "type": "dict", + "collapsible": true, + "key": "{key}", + "label": "{label}", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "list", + "key": "defaults", + "label": "Default Subsets", + "object_type": "text" + } + ] + } +] diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_loader_plugin.json b/pype/settings/entities/schemas/projects_schema/schemas/template_loader_plugin.json new file mode 100644 index 0000000000..20dca6df17 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/template_loader_plugin.json @@ -0,0 +1,22 @@ +[ + { + "type": "dict", + "collapsible": true, + "key": "{key}", + "label": "{label}", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "list", + "key": "representations", + "label": "Representations", + "object_type": "text" + } + ] + } +] diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json b/pype/settings/entities/schemas/projects_schema/schemas/template_publish_plugin.json similarity index 100% rename from pype/settings/entities/schemas/projects_schema/schemas/template_simple_plugin.json rename to pype/settings/entities/schemas/projects_schema/schemas/template_publish_plugin.json From d01918d3c24082fd6c33a561b53fd0c4cc9162d4 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 09:15:09 +0100 Subject: [PATCH 4/8] add nuke validators to settings --- .../nuke/plugins/publish/validate_knobs.py | 2 +- .../defaults/project_settings/nuke.json | 16 ++ .../projects_schema/schema_project_nuke.json | 141 +-------------- .../schemas/schema_nuke_plugins.json | 162 ++++++++++++++++++ 4 files changed, 182 insertions(+), 139 deletions(-) create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json diff --git a/pype/hosts/nuke/plugins/publish/validate_knobs.py b/pype/hosts/nuke/plugins/publish/validate_knobs.py index ce15831c9c..cbc02690cb 100644 --- a/pype/hosts/nuke/plugins/publish/validate_knobs.py +++ b/pype/hosts/nuke/plugins/publish/validate_knobs.py @@ -9,7 +9,7 @@ class ValidateKnobs(pyblish.api.ContextPlugin): Knobs to validate and their values comes from the - Controled by plugin settings that require json in following structure: + Controlled by plugin settings that require json in following structure: "ValidateKnobs": { "enabled": true, "knobs": { diff --git a/pype/settings/defaults/project_settings/nuke.json b/pype/settings/defaults/project_settings/nuke.json index 94cd712639..517065f79a 100644 --- a/pype/settings/defaults/project_settings/nuke.json +++ b/pype/settings/defaults/project_settings/nuke.json @@ -61,6 +61,22 @@ "deadline_pool": "", "deadline_pool_secondary": "", "deadline_chunk_size": 1 + }, + "ValidateOutputResolution": { + "enabled": true, + "optional": true + }, + "ValidateGizmo": { + "enabled": true, + "optional": true + }, + "ValidateScript": { + "enabled": true, + "optional": true + }, + "ValidateNukeWriteBoundingBox": { + "enabled": true, + "optional": true } }, "workfile_build": { diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json index b60b548cb0..2793157c4e 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json @@ -42,144 +42,9 @@ ] }, { - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "PreCollectNukeInstances", - "label": "PreCollectNukeInstances", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "sync_workfile_version", - "label": "Sync Version from workfile" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractThumbnail", - "label": "ExtractThumbnail", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "nodes", - "label": "Nodes" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ValidateKnobs", - "label": "ValidateKnobs", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "knobs", - "label": "Knobs" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractReviewDataLut", - "label": "ExtractReviewDataLut", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractReviewDataMov", - "label": "ExtractReviewDataMov", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "boolean", - "key": "viewer_lut_raw", - "label": "Viewer LUT raw" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ExtractSlateFrame", - "label": "ExtractSlateFrame", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "viewer_lut_raw", - "label": "Viewer LUT raw" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "NukeSubmitDeadline", - "label": "NukeSubmitDeadline", - "is_group": true, - "children": [ - { - "type": "number", - "key": "deadline_priority", - "label": "deadline_priority" - }, - { - "type": "text", - "key": "deadline_pool", - "label": "deadline_pool" - }, - { - "type": "text", - "key": "deadline_pool_secondary", - "label": "deadline_pool_secondary" - }, - { - "type": "number", - "key": "deadline_chunk_size", - "label": "deadline_chunk_size" - } - ] - } - ] + "type": "schema", + "name": "schema_nuke_plugins", + "template_data": [] }, { "type": "schema", diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json new file mode 100644 index 0000000000..aa767144e5 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json @@ -0,0 +1,162 @@ +{ + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "PreCollectNukeInstances", + "label": "PreCollectNukeInstances", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "sync_workfile_version", + "label": "Sync Version from workfile" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractThumbnail", + "label": "ExtractThumbnail", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "nodes", + "label": "Nodes" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ValidateKnobs", + "label": "ValidateKnobs", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "knobs", + "label": "Knobs" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractReviewDataLut", + "label": "ExtractReviewDataLut", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractReviewDataMov", + "label": "ExtractReviewDataMov", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "viewer_lut_raw", + "label": "Viewer LUT raw" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "ExtractSlateFrame", + "label": "ExtractSlateFrame", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "viewer_lut_raw", + "label": "Viewer LUT raw" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "NukeSubmitDeadline", + "label": "NukeSubmitDeadline", + "is_group": true, + "children": [ + { + "type": "number", + "key": "deadline_priority", + "label": "deadline_priority" + }, + { + "type": "text", + "key": "deadline_pool", + "label": "deadline_pool" + }, + { + "type": "text", + "key": "deadline_pool_secondary", + "label": "deadline_pool_secondary" + }, + { + "type": "number", + "key": "deadline_chunk_size", + "label": "deadline_chunk_size" + } + ] + }, + { + "type": "schema_template", + "name": "template_publish_plugin", + "template_data": [ + { + "key": "ValidateOutputResolution", + "label": "Validate Output Resolution" + }, + { + "key": "ValidateGizmo", + "label": "Validate Gizmo (Group)" + }, + { + "key": "ValidateScript", + "label": "Validate script settings" + }, + { + "key": "ValidateNukeWriteBoundingBox", + "label": "Validate and Write Bounding Box" + } + ] + } + ] +} From 2c979b95bbf589bba278d2edb83e6b365ed04aa4 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 10:03:15 +0100 Subject: [PATCH 5/8] add harmony plugin settings --- .../defaults/project_settings/harmony.json | 15 +- .../schema_project_harmony.json | 62 ++++++- .../schemas/schema_nuke_publish.json | 162 ++++++++++++++++++ 3 files changed, 231 insertions(+), 8 deletions(-) create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json diff --git a/pype/settings/defaults/project_settings/harmony.json b/pype/settings/defaults/project_settings/harmony.json index 83d63d3392..d69b05f534 100644 --- a/pype/settings/defaults/project_settings/harmony.json +++ b/pype/settings/defaults/project_settings/harmony.json @@ -1,7 +1,20 @@ { - "publish": {}, "general": { "skip_resolution_check": [], "skip_timelines_check": [] + }, + "publish": { + "CollectPalettes": { + "allowed_tasks": [ + "." + ] + }, + "HarmonySubmitDeadline": { + "use_published": false, + "priority": 50, + "primary_pool": "", + "secondary_pool": "", + "Chunk Size": 10000 + } } } \ No newline at end of file diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 5d1cbff1b8..583eca9692 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -5,13 +5,6 @@ "label": "Harmony", "is_file": true, "children": [ - { - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "children": [] - }, { "type": "dict", "collapsible": true, @@ -31,6 +24,61 @@ "label": "Skip Timeliene Check for Tasks" } ] + }, + { + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "CollectPalettes", + "label": "Collect Palettes", + "children": [ + { + "type": "list", + "key": "allowed_tasks", + "label": "Allowed tasks", + "object_type": "text" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "HarmonySubmitDeadline", + "label": "Harmony Submit to Deadline", + "children": [ + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "priority" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + } + ] + } + ] } ] } diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json new file mode 100644 index 0000000000..aa767144e5 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json @@ -0,0 +1,162 @@ +{ + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "PreCollectNukeInstances", + "label": "PreCollectNukeInstances", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "sync_workfile_version", + "label": "Sync Version from workfile" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractThumbnail", + "label": "ExtractThumbnail", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "nodes", + "label": "Nodes" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ValidateKnobs", + "label": "ValidateKnobs", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "knobs", + "label": "Knobs" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractReviewDataLut", + "label": "ExtractReviewDataLut", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractReviewDataMov", + "label": "ExtractReviewDataMov", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "viewer_lut_raw", + "label": "Viewer LUT raw" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "ExtractSlateFrame", + "label": "ExtractSlateFrame", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "viewer_lut_raw", + "label": "Viewer LUT raw" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "NukeSubmitDeadline", + "label": "NukeSubmitDeadline", + "is_group": true, + "children": [ + { + "type": "number", + "key": "deadline_priority", + "label": "deadline_priority" + }, + { + "type": "text", + "key": "deadline_pool", + "label": "deadline_pool" + }, + { + "type": "text", + "key": "deadline_pool_secondary", + "label": "deadline_pool_secondary" + }, + { + "type": "number", + "key": "deadline_chunk_size", + "label": "deadline_chunk_size" + } + ] + }, + { + "type": "schema_template", + "name": "template_publish_plugin", + "template_data": [ + { + "key": "ValidateOutputResolution", + "label": "Validate Output Resolution" + }, + { + "key": "ValidateGizmo", + "label": "Validate Gizmo (Group)" + }, + { + "key": "ValidateScript", + "label": "Validate script settings" + }, + { + "key": "ValidateNukeWriteBoundingBox", + "label": "Validate and Write Bounding Box" + } + ] + } + ] +} From 1d91bca162780c7bf99ee23899fe71bb37c5db3e Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 10:44:27 +0100 Subject: [PATCH 6/8] add deadline plugins to settings --- .../plugins/publish/submit_nuke_deadline.py | 24 +- .../defaults/project_settings/deadline.json | 44 ++++ .../defaults/project_settings/harmony.json | 2 +- .../schemas/projects_schema/schema_main.json | 4 + .../projects_schema/schema_plugins.json | 54 ----- .../schema_project_deadline.json | 223 ++++++++++++++++++ .../schema_project_harmony.json | 2 +- .../schemas/schema_nuke_publish.json | 29 --- 8 files changed, 285 insertions(+), 97 deletions(-) create mode 100644 pype/settings/defaults/project_settings/deadline.json delete mode 100644 pype/settings/entities/schemas/projects_schema/schema_plugins.json create mode 100644 pype/settings/entities/schemas/projects_schema/schema_project_deadline.json diff --git a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py index b36e1fdbba..f352a9b5c0 100644 --- a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py @@ -23,12 +23,12 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): optional = True # presets - deadline_priority = 50 + priority = 50 deadline_chunk_size = 1 - deadline_pool = "" - deadline_pool_secondary = "" - deadline_group = "" - deadline_department = "" + primary_pool = "" + secondary_pool = "" + group = "" + department = "" def process(self, instance): instance.data["toBeRenderedOn"] = "deadline" @@ -142,12 +142,12 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): # define chunk and priority chunk_size = instance.data.get("deadlineChunkSize") - if chunk_size == 0 and self.deadline_chunk_size: - chunk_size = self.deadline_chunk_size + if chunk_size == 0 and self.chunk_size: + chunk_size = self.chunk_size priority = instance.data.get("deadlinePriority") if not priority: - priority = self.deadline_priority + priority = self.priority payload = { "JobInfo": { @@ -165,11 +165,11 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): "Priority": priority, "ChunkSize": chunk_size, - "Department": self.deadline_department, + "Department": self.department, - "Pool": self.deadline_pool, - "SecondaryPool": self.deadline_pool_secondary, - "Group": self.deadline_group, + "Pool": self.primary_pool, + "SecondaryPool": self.secondary_pool, + "Group": self.group, "Plugin": "Nuke", "Frames": "{start}-{end}".format( diff --git a/pype/settings/defaults/project_settings/deadline.json b/pype/settings/defaults/project_settings/deadline.json new file mode 100644 index 0000000000..6844979ddb --- /dev/null +++ b/pype/settings/defaults/project_settings/deadline.json @@ -0,0 +1,44 @@ +{ + "publish": { + "MayaSubmitDeadline": { + "enabled": true, + "optional": false, + "tile_assembler_plugin": "oiio", + "use_published": true, + "asset_dependencies": true + }, + "NukeSubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + }, + "HarmonySubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10000, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + }, + "AfterEffectsSubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10000, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + } + } +} \ No newline at end of file diff --git a/pype/settings/defaults/project_settings/harmony.json b/pype/settings/defaults/project_settings/harmony.json index d69b05f534..e1de4485a4 100644 --- a/pype/settings/defaults/project_settings/harmony.json +++ b/pype/settings/defaults/project_settings/harmony.json @@ -14,7 +14,7 @@ "priority": 50, "primary_pool": "", "secondary_pool": "", - "Chunk Size": 10000 + "chunk_size": 0 } } } \ No newline at end of file diff --git a/pype/settings/entities/schemas/projects_schema/schema_main.json b/pype/settings/entities/schemas/projects_schema/schema_main.json index 8ad059f1c7..31d7373873 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_main.json +++ b/pype/settings/entities/schemas/projects_schema/schema_main.json @@ -45,6 +45,10 @@ "type": "schema", "name": "schema_project_ftrack" }, + { + "type": "schema", + "name": "schema_project_deadline" + }, { "type": "schema", "name": "schema_project_maya" diff --git a/pype/settings/entities/schemas/projects_schema/schema_plugins.json b/pype/settings/entities/schemas/projects_schema/schema_plugins.json deleted file mode 100644 index a7ed64be17..0000000000 --- a/pype/settings/entities/schemas/projects_schema/schema_plugins.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "type": "dict", - "collapsible": true, - "key": "plugins", - "label": "Plugins", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "standalonepublisher", - "label": "Standalone Publisher", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "is_file": true, - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "ExtractThumbnailSP", - "label": "ExtractThumbnailSP", - "is_group": true, - "children": [ - { - "type": "dict", - "collapsible": false, - "key": "ffmpeg_args", - "label": "ffmpeg_args", - "children": [ - { - "type": "list", - "object_type": "text", - "key": "input", - "label": "input" - }, - { - "type": "list", - "object_type": "text", - "key": "output", - "label": "output" - } - ] - } - ] - } - ] - } - ] - } - ] -} diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json b/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json new file mode 100644 index 0000000000..ea76f4e62e --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json @@ -0,0 +1,223 @@ +{ + "type": "dict", + "key": "deadline", + "label": "Deadline", + "collapsible": true, + "is_file": true, + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "is_file": true, + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "MayaSubmitDeadline", + "label": "Submit maya job to deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "enum", + "key": "tile_assembler_plugin", + "label": "Tile Assembler Plugin", + "multiselection": false, + "enum_items": [ + { + "DraftTileAssembler": "Draft Tile Assembler" + }, + { + "oiio": "Open Image IO" + } + ] + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "boolean", + "key": "asset_dependencies", + "label": "Use Asset dependencies" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "NukeSubmitDeadline", + "label": "Nuke Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "HarmonySubmitDeadline", + "label": "Harmony Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "AfterEffectsSubmitDeadline", + "label": "After Effects Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + } + ] + } + ] +} diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 583eca9692..c4cdccff42 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -73,7 +73,7 @@ }, { "type": "number", - "key": "Chunk Size", + "key": "chunk_size", "label": "Chunk Size" } ] diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json index aa767144e5..e9b3e1c36e 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json @@ -107,35 +107,6 @@ } ] }, - { - "type": "dict", - "collapsible": true, - "key": "NukeSubmitDeadline", - "label": "NukeSubmitDeadline", - "is_group": true, - "children": [ - { - "type": "number", - "key": "deadline_priority", - "label": "deadline_priority" - }, - { - "type": "text", - "key": "deadline_pool", - "label": "deadline_pool" - }, - { - "type": "text", - "key": "deadline_pool_secondary", - "label": "deadline_pool_secondary" - }, - { - "type": "number", - "key": "deadline_chunk_size", - "label": "deadline_chunk_size" - } - ] - }, { "type": "schema_template", "name": "template_publish_plugin", From 189114feeba012ea594e6073bf1bbc84285d1548 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 12:12:36 +0100 Subject: [PATCH 7/8] small schema cleanups --- .../schema_project_global.json | 10 +- .../projects_schema/schema_project_nuke.json | 4 +- .../schema_project_standalonepublisher.json | 76 ++--- .../schemas/schema_maya_publish.json | 320 +++++++++--------- .../schemas/schema_nuke_plugins.json | 162 --------- .../schemas/schema_nuke_publish.json | 105 ++++-- 6 files changed, 286 insertions(+), 391 deletions(-) delete mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_global.json b/pype/settings/entities/schemas/projects_schema/schema_project_global.json index fa5db9af88..e6a1a6ff96 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_global.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_global.json @@ -14,9 +14,15 @@ "name": "schema_global_tools" }, { - "type": "raw-json", + "type": "collapsible-wrap", "label": "Project Folder Structure", - "key": "project_folder_structure" + "children": [ + { + "type": "raw-json", + "label": " ", + "key": "project_folder_structure" + } + ] }, { "type": "schema", diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json index 2793157c4e..0548bd3544 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json @@ -9,7 +9,7 @@ "type": "dict", "collapsible": true, "key": "create", - "label": "Create plugins", + "label": "Creator plugins", "children": [ { "type": "dict", @@ -43,7 +43,7 @@ }, { "type": "schema", - "name": "schema_nuke_plugins", + "name": "schema_nuke_publish", "template_data": [] }, { diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_standalonepublisher.json b/pype/settings/entities/schemas/projects_schema/schema_project_standalonepublisher.json index 735b9611d2..47eea3441c 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_standalonepublisher.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_standalonepublisher.json @@ -5,44 +5,6 @@ "label": "Standalone Publisher", "is_file": true, "children": [ - { - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "is_file": true, - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "ExtractThumbnailSP", - "label": "ExtractThumbnailSP", - "is_group": true, - "children": [ - { - "type": "dict", - "collapsible": false, - "key": "ffmpeg_args", - "label": "ffmpeg_args", - "children": [ - { - "type": "list", - "object_type": "text", - "key": "input", - "label": "input" - }, - { - "type": "list", - "object_type": "text", - "key": "output", - "label": "output" - } - ] - } - ] - } - ] - }, { "type": "dict-modifiable", "collapsible": true, @@ -88,6 +50,44 @@ } ] } + }, + { + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "is_file": true, + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "ExtractThumbnailSP", + "label": "ExtractThumbnailSP", + "is_group": true, + "children": [ + { + "type": "dict", + "collapsible": false, + "key": "ffmpeg_args", + "label": "ffmpeg_args", + "children": [ + { + "type": "list", + "object_type": "text", + "key": "input", + "label": "input" + }, + { + "type": "list", + "object_type": "text", + "key": "output", + "label": "output" + } + ] + } + ] + } + ] } ] } diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 1d643b6273..58a21c185a 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -21,16 +21,66 @@ } ] }, + { + "type": "splitter" + }, + { + "type": "label", + "label": "Validators" + }, + { + "type": "dict", + "collapsible": true, + "key": "ValidateShaderName", + "label": "ValidateShaderName", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "label", + "label": "Shader name regex can use named capture group asset to validate against current asset name.

Example:
^.*(?P=<asset>.+)_SHD

" + }, + { + "type": "text", + "key": "regex", + "label": "Validation regex" + } + ] + }, + + { + "type": "dict", + "collapsible": true, + "key": "ValidateAttributes", + "label": "ValidateAttributes", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "attributes", + "label": "Attributes" + } + ] + }, { "type": "collapsible-wrap", - "label": "Validators", + "label": "Model", "children": [ { "type": "dict", "collapsible": true, - "key": "ValidateShaderName", - "label": "ValidateShaderName", + "key": "ValidateModelName", + "label": "Validate Model Name", "checkbox_key": "enabled", "children": [ { @@ -40,7 +90,14 @@ }, { "type": "label", - "label": "Shader name regex can use named capture group asset to validate against current asset name.

Example:
^.*(?P=<asset>.+)_SHD

" + "label": "Path to material file defining list of material names to check. This is material name per line simple text file.
It will be checked against named group shader in your Validation regex.

For example:
^.*(?P=<shader>.+)_GEO

" + }, + { + "type": "path-widget", + "key": "material_file", + "label": "Material File", + "multiplatform": true, + "multipath": false }, { "type": "text", @@ -49,12 +106,11 @@ } ] }, - { "type": "dict", "collapsible": true, - "key": "ValidateAttributes", - "label": "ValidateAttributes", + "key": "ValidateTransformNamingSuffix", + "label": "ValidateTransformNamingSuffix", "checkbox_key": "enabled", "children": [ { @@ -62,154 +118,19 @@ "key": "enabled", "label": "Enabled" }, + { + "type": "label", + "label": "Validates transform suffix based on the type of its children shapes." + }, { "type": "raw-json", - "key": "attributes", - "label": "Attributes" - } - ] - }, - { - "type": "collapsible-wrap", - "label": "Model", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "ValidateModelName", - "label": "Validate Model Name", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "label", - "label": "Path to material file defining list of material names to check. This is material name per line simple text file.
It will be checked against named group shader in your Validation regex.

For example:
^.*(?P=<shader>.+)_GEO

" - }, - { - "type": "path-widget", - "key": "material_file", - "label": "Material File", - "multiplatform": true, - "multipath": false - }, - { - "type": "text", - "key": "regex", - "label": "Validation regex" - } - ] + "key": "SUFFIX_NAMING_TABLE", + "label": "Suffix Naming Table" }, { - "type": "dict", - "collapsible": true, - "key": "ValidateTransformNamingSuffix", - "label": "ValidateTransformNamingSuffix", - "checkbox_key": "enabled", - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "label", - "label": "Validates transform suffix based on the type of its children shapes." - }, - { - "type": "raw-json", - "key": "SUFFIX_NAMING_TABLE", - "label": "Suffix Naming Table" - }, - { - "type": "boolean", - "key": "ALLOW_IF_NOT_IN_SUFFIX_TABLE", - "label": "Allow if suffix not in table" - } - ] - }, - { - "type": "schema_template", - "name": "template_publish_plugin", - "template_data": [ - { - "key": "ValidateColorSets", - "label": "ValidateColorSets" - }, - { - "key": "ValidateMeshHasOverlappingUVs", - "label": "ValidateMeshHasOverlappingUVs" - }, - { - "key": "ValidateMeshArnoldAttributes", - "label": "ValidateMeshArnoldAttributes" - }, - { - "key": "ValidateMeshShaderConnections", - "label": "ValidateMeshShaderConnections" - }, - { - "key": "ValidateMeshSingleUVSet", - "label": "ValidateMeshSingleUVSet" - }, - { - "key": "ValidateMeshHasUVs", - "label": "ValidateMeshHasUVs" - }, - { - "key": "ValidateMeshLaminaFaces", - "label": "ValidateMeshLaminaFaces" - }, - { - "key": "ValidateMeshNonManifold", - "label": "ValidateMeshNonManifold" - }, - { - "key": "ValidateMeshUVSetMap1", - "label": "ValidateMeshUVSetMap1", - "docstring": "Validate model's default uv set exists and is named 'map1'.

In Maya meshes by default have a uv set named 'map1' that cannot be deleted. It can be renamed, however,
introducing some issues with some renderers. As such we ensure the first (default) UV set index is named 'map1'." - }, - { - "key": "ValidateMeshVerticesHaveEdges", - "label": "ValidateMeshVerticesHaveEdges" - }, - { - "key": "ValidateNoAnimation", - "label": "ValidateNoAnimation", - "docstring": "Ensure no keyframes on nodes in the Instance.
Even though a Model would extract without animCurves correctly this avoids getting different
output from a model when extracted from a different frame than the first frame. (Might be overly restrictive though)." - }, - { - "key": "ValidateNoNamespace", - "label": "ValidateNoNamespace" - }, - { - "key": "ValidateNoNullTransforms", - "label": "ValidateNoNullTransforms" - }, - { - "key": "ValidateNoUnknownNodes", - "label": "ValidateNoUnknownNodes" - }, - { - "key": "ValidateNodeNoGhosting", - "label": "ValidateNodeNoGhosting" - }, - { - "key": "ValidateShapeDefaultNames", - "label": "ValidateShapeDefaultNames" - }, - { - "key": "ValidateShapeRenderStats", - "label": "ValidateShapeRenderStats" - }, - { - "key": "ValidateTransformZero", - "label": "ValidateTransformZero" - } - ] + "type": "boolean", + "key": "ALLOW_IF_NOT_IN_SUFFIX_TABLE", + "label": "Allow if suffix not in table" } ] }, @@ -218,22 +139,105 @@ "name": "template_publish_plugin", "template_data": [ { - "key": "ValidateCameraAttributes", - "label": "Validate Camera Attributes", - "docstring": "" + "key": "ValidateColorSets", + "label": "ValidateColorSets" }, { - "key": "ValidateAssemblyName", - "label": "Validate Assembly Name" + "key": "ValidateMeshHasOverlappingUVs", + "label": "ValidateMeshHasOverlappingUVs" }, { - "key": "ValidateAssRelativePaths", - "label": "ValidateAssRelativePaths" + "key": "ValidateMeshArnoldAttributes", + "label": "ValidateMeshArnoldAttributes" + }, + { + "key": "ValidateMeshShaderConnections", + "label": "ValidateMeshShaderConnections" + }, + { + "key": "ValidateMeshSingleUVSet", + "label": "ValidateMeshSingleUVSet" + }, + { + "key": "ValidateMeshHasUVs", + "label": "ValidateMeshHasUVs" + }, + { + "key": "ValidateMeshLaminaFaces", + "label": "ValidateMeshLaminaFaces" + }, + { + "key": "ValidateMeshNonManifold", + "label": "ValidateMeshNonManifold" + }, + { + "key": "ValidateMeshUVSetMap1", + "label": "ValidateMeshUVSetMap1", + "docstring": "Validate model's default uv set exists and is named 'map1'.

In Maya meshes by default have a uv set named 'map1' that cannot be deleted. It can be renamed, however,
introducing some issues with some renderers. As such we ensure the first (default) UV set index is named 'map1'." + }, + { + "key": "ValidateMeshVerticesHaveEdges", + "label": "ValidateMeshVerticesHaveEdges" + }, + { + "key": "ValidateNoAnimation", + "label": "ValidateNoAnimation", + "docstring": "Ensure no keyframes on nodes in the Instance.
Even though a Model would extract without animCurves correctly this avoids getting different
output from a model when extracted from a different frame than the first frame. (Might be overly restrictive though)." + }, + { + "key": "ValidateNoNamespace", + "label": "ValidateNoNamespace" + }, + { + "key": "ValidateNoNullTransforms", + "label": "ValidateNoNullTransforms" + }, + { + "key": "ValidateNoUnknownNodes", + "label": "ValidateNoUnknownNodes" + }, + { + "key": "ValidateNodeNoGhosting", + "label": "ValidateNodeNoGhosting" + }, + { + "key": "ValidateShapeDefaultNames", + "label": "ValidateShapeDefaultNames" + }, + { + "key": "ValidateShapeRenderStats", + "label": "ValidateShapeRenderStats" + }, + { + "key": "ValidateTransformZero", + "label": "ValidateTransformZero" } ] } ] }, + { + "type": "schema_template", + "name": "template_publish_plugin", + "template_data": [ + { + "key": "ValidateCameraAttributes", + "label": "Validate Camera Attributes", + "docstring": "" + }, + { + "key": "ValidateAssemblyName", + "label": "Validate Assembly Name" + }, + { + "key": "ValidateAssRelativePaths", + "label": "ValidateAssRelativePaths" + } + ] + }, + { + "type": "splitter" + }, { "type": "label", "label": "Extractors" diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json deleted file mode 100644 index aa767144e5..0000000000 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_plugins.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "PreCollectNukeInstances", - "label": "PreCollectNukeInstances", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "sync_workfile_version", - "label": "Sync Version from workfile" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractThumbnail", - "label": "ExtractThumbnail", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "nodes", - "label": "Nodes" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ValidateKnobs", - "label": "ValidateKnobs", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "knobs", - "label": "Knobs" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractReviewDataLut", - "label": "ExtractReviewDataLut", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractReviewDataMov", - "label": "ExtractReviewDataMov", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "boolean", - "key": "viewer_lut_raw", - "label": "Viewer LUT raw" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "ExtractSlateFrame", - "label": "ExtractSlateFrame", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "viewer_lut_raw", - "label": "Viewer LUT raw" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "NukeSubmitDeadline", - "label": "NukeSubmitDeadline", - "is_group": true, - "children": [ - { - "type": "number", - "key": "deadline_priority", - "label": "deadline_priority" - }, - { - "type": "text", - "key": "deadline_pool", - "label": "deadline_pool" - }, - { - "type": "text", - "key": "deadline_pool_secondary", - "label": "deadline_pool_secondary" - }, - { - "type": "number", - "key": "deadline_chunk_size", - "label": "deadline_chunk_size" - } - ] - }, - { - "type": "schema_template", - "name": "template_publish_plugin", - "template_data": [ - { - "key": "ValidateOutputResolution", - "label": "Validate Output Resolution" - }, - { - "key": "ValidateGizmo", - "label": "Validate Gizmo (Group)" - }, - { - "key": "ValidateScript", - "label": "Validate script settings" - }, - { - "key": "ValidateNukeWriteBoundingBox", - "label": "Validate and Write Bounding Box" - } - ] - } - ] -} diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json index e9b3e1c36e..0e3770ac78 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json @@ -4,6 +4,10 @@ "key": "publish", "label": "Publish plugins", "children": [ + { + "type": "label", + "label": "Collectors" + }, { "type": "dict", "collapsible": true, @@ -17,26 +21,13 @@ "label": "Sync Version from workfile" } ] + }, + { + "type": "splitter" }, { - "type": "dict", - "collapsible": true, - "checkbox_key": "enabled", - "key": "ExtractThumbnail", - "label": "ExtractThumbnail", - "is_group": true, - "children": [ - { - "type": "boolean", - "key": "enabled", - "label": "Enabled" - }, - { - "type": "raw-json", - "key": "nodes", - "label": "Nodes" - } - ] + "type": "label", + "label": "Validators" }, { "type": "dict", @@ -58,6 +49,55 @@ } ] }, + { + "type": "schema_template", + "name": "template_publish_plugin", + "template_data": [ + { + "key": "ValidateOutputResolution", + "label": "Validate Output Resolution" + }, + { + "key": "ValidateGizmo", + "label": "Validate Gizmo (Group)" + }, + { + "key": "ValidateScript", + "label": "Validate script settings" + }, + { + "key": "ValidateNukeWriteBoundingBox", + "label": "Validate and Write Bounding Box" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "label", + "label": "Extractors" + }, + { + "type": "dict", + "collapsible": true, + "checkbox_key": "enabled", + "key": "ExtractThumbnail", + "label": "ExtractThumbnail", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "raw-json", + "key": "nodes", + "label": "Nodes" + } + ] + }, { "type": "dict", "collapsible": true, @@ -108,24 +148,31 @@ ] }, { - "type": "schema_template", - "name": "template_publish_plugin", - "template_data": [ + "type": "dict", + "collapsible": true, + "key": "NukeSubmitDeadline", + "label": "NukeSubmitDeadline", + "is_group": true, + "children": [ { - "key": "ValidateOutputResolution", - "label": "Validate Output Resolution" + "type": "number", + "key": "deadline_priority", + "label": "deadline_priority" }, { - "key": "ValidateGizmo", - "label": "Validate Gizmo (Group)" + "type": "text", + "key": "deadline_pool", + "label": "deadline_pool" }, { - "key": "ValidateScript", - "label": "Validate script settings" + "type": "text", + "key": "deadline_pool_secondary", + "label": "deadline_pool_secondary" }, { - "key": "ValidateNukeWriteBoundingBox", - "label": "Validate and Write Bounding Box" + "type": "number", + "key": "deadline_chunk_size", + "label": "deadline_chunk_size" } ] } From 98ba3225aa101330c8f2e9ae58eee4f24ad13766 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 12:14:25 +0100 Subject: [PATCH 8/8] fix wrong chunk_size attribute --- pype/modules/deadline/plugins/publish/submit_nuke_deadline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py index f352a9b5c0..af8694dd22 100644 --- a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py @@ -24,7 +24,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): # presets priority = 50 - deadline_chunk_size = 1 + chunk_size = 1 primary_pool = "" secondary_pool = "" group = ""