add maya validators to settings

This commit is contained in:
Milan Kolar 2021-02-23 18:17:50 +01:00
parent 7e97e8de27
commit 5deb8d8efe
4 changed files with 237 additions and 124 deletions

View file

@ -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,

View file

@ -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:

View file

@ -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 <b>asset</b> to validate against current asset name.<p><b>Example:</b><br/><code>^.*(?P=&lt;asset&gt;.+)_SHD</code></p>"
},
{
"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.<br/>It will be checked against named group <b>shader</b> in your <em>Validation regex</em>.<p>For example: <br/> <code>^.*(?P=&lt;shader&gt;.+)_GEO</code></p>"
},
{
"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'.<br><br>In Maya meshes by default have a uv set named 'map1' that cannot be deleted. It can be renamed, however,<br> 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.<br>Even though a Model would extract without animCurves correctly this avoids getting different <br> 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.<br/>It will be checked against named group <b>shader</b> in your <em>Validation regex</em>.<p>For example: <br/> <code>^.*(?P=&lt;shader&gt;.+)_GEO</code></p>"
},
{
"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 <b>asset</b> to validate against current asset name.<p><b>Example:</b><br/><code>^.*(?P=&lt;asset&gt;.+)_SHD</code></p>"
},
{
"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"

View file

@ -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}"
}
]
}
]