From b1151924ad9be3e56f9216c81ca4f26b0f4f230a Mon Sep 17 00:00:00 2001 From: aardschok Date: Fri, 4 Aug 2017 16:18:58 +0200 Subject: [PATCH] added explicit attribute check --- .../plugins/maya/publish/validate_unique_node_ids.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/colorbleed/plugins/maya/publish/validate_unique_node_ids.py b/colorbleed/plugins/maya/publish/validate_unique_node_ids.py index 9dbd62e7ff..edae718c02 100644 --- a/colorbleed/plugins/maya/publish/validate_unique_node_ids.py +++ b/colorbleed/plugins/maya/publish/validate_unique_node_ids.py @@ -28,13 +28,10 @@ class ValidateUniqueNodeIds(pyblish.api.InstancePlugin): # Collect each id with their members ids = defaultdict(list) for member in instance: - try: - object_id = cmds.getAttr("{}.{}".format(member, uuid_attr)) - except Exception as exception: - # Object will node have the attribute so skip - cls.log.debug(exception) + if not cmds.attributeQuery(uuid_attr, node=member, exists=True): continue + object_id = cmds.getAttr("{}.{}".format(member, uuid_attr)) ids[object_id].append(member) # Skip those without IDs (if everything should have an ID that should