From c762fa92f6ab7f692c751fefdffe5f9c9571d582 Mon Sep 17 00:00:00 2001 From: macman Date: Mon, 20 Jun 2022 13:39:52 +0300 Subject: [PATCH 1/5] Handle excluding `model` family from frame range validator. --- openpype/hosts/maya/plugins/publish/validate_frame_range.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_frame_range.py b/openpype/hosts/maya/plugins/publish/validate_frame_range.py index 98b5b4d79b2..4415815d327 100644 --- a/openpype/hosts/maya/plugins/publish/validate_frame_range.py +++ b/openpype/hosts/maya/plugins/publish/validate_frame_range.py @@ -27,6 +27,7 @@ class ValidateFrameRange(pyblish.api.InstancePlugin): "yeticache"] optional = True actions = [openpype.api.RepairAction] + exclude_families = ["model"] def process(self, instance): context = instance.context @@ -56,7 +57,9 @@ def process(self, instance): # compare with data on instance errors = [] - + if [ef for ef in self.exclude_families + if instance.data["family"] in ef]: + return if(inst_start != frame_start_handle): errors.append("Instance start frame [ {} ] doesn't " "match the one set on instance [ {} ]: " From 35e5f7a3d256c799c18765a3d1e712e60a28ca9b Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 28 Jun 2022 14:02:25 +0300 Subject: [PATCH 2/5] Expose excluded families in publisher schema. --- .../defaults/project_settings/maya.json | 3 +- .../schemas/schema_maya_publish.json | 35 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index cdd3a62d004..89aa7a66e6f 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -204,7 +204,8 @@ "ValidateFrameRange": { "enabled": true, "optional": true, - "active": true + "active": true, + "exclude_families": [] }, "ValidateShaderName": { "enabled": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 41b681d893f..84182973a1a 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -62,13 +62,36 @@ } ] }, - { - "type": "schema_template", - "name": "template_publish_plugin", - "template_data": [ + { + "type": "dict", + "collapsible": true, + "key": "ValidateFrameRange", + "label": "Validate Frame Range", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "active", + "label": "Active" + }, + { + "type": "splitter" + }, { - "key": "ValidateFrameRange", - "label": "Validate Frame Range" + "key": "exclude_families", + "label": "Families", + "type": "list", + "object_type": "text" } ] }, From c7b5a6ac84cd8ec3ecbce11add48f7982458c770 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 28 Jun 2022 14:02:39 +0300 Subject: [PATCH 3/5] Add additional exclude families. --- openpype/hosts/maya/plugins/publish/validate_frame_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_frame_range.py b/openpype/hosts/maya/plugins/publish/validate_frame_range.py index 4415815d327..d07a8db957d 100644 --- a/openpype/hosts/maya/plugins/publish/validate_frame_range.py +++ b/openpype/hosts/maya/plugins/publish/validate_frame_range.py @@ -27,7 +27,7 @@ class ValidateFrameRange(pyblish.api.InstancePlugin): "yeticache"] optional = True actions = [openpype.api.RepairAction] - exclude_families = ["model"] + exclude_families = ["model", "rig", "staticMesh"] def process(self, instance): context = instance.context From 809153b1449da7b6614a296ce19e95a446882f95 Mon Sep 17 00:00:00 2001 From: "Allan I. A" <76656700+Allan-I@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:42:11 +0300 Subject: [PATCH 4/5] Update openpype/settings/defaults/project_settings/maya.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move default families. Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 89aa7a66e6f..9bebd92cb9b 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -205,7 +205,7 @@ "enabled": true, "optional": true, "active": true, - "exclude_families": [] + "exclude_families": ["model", "rig", "staticMesh"] }, "ValidateShaderName": { "enabled": false, From 027cdf4f3a0dfc10b96555bf9920c3e9e3287cbe Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 28 Jun 2022 14:49:31 +0300 Subject: [PATCH 5/5] Remove unnecessary defaults. --- openpype/hosts/maya/plugins/publish/validate_frame_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_frame_range.py b/openpype/hosts/maya/plugins/publish/validate_frame_range.py index d07a8db957d..c51766379e3 100644 --- a/openpype/hosts/maya/plugins/publish/validate_frame_range.py +++ b/openpype/hosts/maya/plugins/publish/validate_frame_range.py @@ -27,7 +27,7 @@ class ValidateFrameRange(pyblish.api.InstancePlugin): "yeticache"] optional = True actions = [openpype.api.RepairAction] - exclude_families = ["model", "rig", "staticMesh"] + exclude_families = [] def process(self, instance): context = instance.context