Fix collecting and assigning enum values

This commit is contained in:
Toke Stuart Jepsen 2023-02-16 08:30:57 +00:00
parent cf4fd979cb
commit 2cb2ba00b7
2 changed files with 5 additions and 1 deletions

View file

@ -556,7 +556,7 @@ class CollectLook(pyblish.api.InstancePlugin):
continue
if cmds.getAttr(attribute, type=True) == "message":
continue
node_attributes[attr] = cmds.getAttr(attribute)
node_attributes[attr] = cmds.getAttr(attribute, asString=True)
# Only include if there are any properties we care about
if not node_attributes:
continue

View file

@ -206,7 +206,11 @@ def assign_look(standin, subset):
)
continue
if isinstance(value, str):
value = "'{}'".format(value)
assignment = "{}={}".format(ATTRIBUTE_MAPPING[attr], value)
for node in edit["nodes"]:
node_assignments[node].append(assignment)