Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maya: Render settings validation attribute check tweak logging #3821

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions openpype/hosts/maya/plugins/publish/validate_rendersettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,20 @@ def get_invalid(cls, instance):
# 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:
Expand Down