From 2a0e377ff4288a47efa184e51dd64a5158eeee62 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 2 Aug 2022 20:08:37 +0800 Subject: [PATCH] introduce a condition to exclude the unneccessary node attributes during collecting looks --- openpype/hosts/maya/plugins/publish/collect_look.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_look.py b/openpype/hosts/maya/plugins/publish/collect_look.py index ec583bcce7..4a14fc4451 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -551,7 +551,11 @@ class CollectLook(pyblish.api.InstancePlugin): if cmds.getAttr(attribute, type=True) == "message": continue node_attributes[attr] = cmds.getAttr(attribute) - + + # Only include if there are any properties we care about + if not node_attributes: + continue + attributes.append({"name": node, "uuid": lib.get_id(node), "attributes": node_attributes})