Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3370 from pypeclub/OP-2449/Maya-Validate-Frame-Range
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolar authored Jul 5, 2022
2 parents f277640 + 0a09211 commit 8a52e70
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
5 changes: 4 additions & 1 deletion openpype/hosts/maya/plugins/publish/validate_frame_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ValidateFrameRange(pyblish.api.InstancePlugin):
"yeticache"]
optional = True
actions = [openpype.api.RepairAction]
exclude_families = []

def process(self, instance):
context = instance.context
Expand Down Expand Up @@ -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 [ {} ]: "
Expand Down
3 changes: 2 additions & 1 deletion openpype/settings/defaults/project_settings/maya.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
"ValidateFrameRange": {
"enabled": true,
"optional": true,
"active": true
"active": true,
"exclude_families": ["model", "rig", "staticMesh"]
},
"ValidateShaderName": {
"enabled": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
},
Expand Down

0 comments on commit 8a52e70

Please sign in to comment.