Merge pull request #3821 from BigRoy/maya_validate_render_settings_attribute_check_logging

This commit is contained in:
Milan Kolar 2022-10-05 16:21:24 +02:00 committed by GitHub
commit 7bc645e7fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View file

@ -268,14 +268,20 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
# go through definitions and test if such node.attribute exists.
# if so, compare its value from the one required.
for attr, value in OrderedDict(validation_settings).items():
# first get node of that type
cls.log.debug("{}: {}".format(attr, value))
node_type = attr.split(".")[0]
attribute_name = ".".join(attr.split(".")[1:])
if "." not in attr:
cls.log.warning("Skipping invalid attribute defined in "
"validation settings: '{}'".format(attr))
continue
node_type, attribute_name = attr.split(".", 1)
# first get node of that type
nodes = cmds.ls(type=node_type)
if not isinstance(nodes, list):
cls.log.warning("No nodes of '{}' found.".format(node_type))
if not nodes:
cls.log.warning(
"No nodes of type '{}' found.".format(node_type))
continue
for node in nodes:

View file

@ -140,7 +140,7 @@
},
{
"type": "label",
"label": "Add additional options - put attribute and value, like <code>AASamples</code>"
"label": "Add additional options - put attribute and value, like <code>defaultArnoldRenderOptions.AASamples</code> = <code>4</code>"
},
{
"type": "dict-modifiable",
@ -276,7 +276,7 @@
},
{
"type": "label",
"label": "Add additional options - put attribute and value, like <code>aaFilterSize</code>"
"label": "Add additional options - put attribute and value, like <code>vraySettings.aaFilterSize</code> = <code>1.5</code>"
},
{
"type": "dict-modifiable",
@ -405,7 +405,7 @@
},
{
"type": "label",
"label": "Add additional options - put attribute and value, like <code>reflectionMaxTraceDepth</code>"
"label": "Add additional options - put attribute and value, like <code>redshiftOptions.reflectionMaxTraceDepth</code> = <code>3</code>"
},
{
"type": "dict-modifiable",