From 2cb2ba00b788b1423d86098bf99d50b6f27ccc3b Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Thu, 16 Feb 2023 08:30:57 +0000 Subject: [PATCH] Fix collecting and assigning enum values --- openpype/hosts/maya/plugins/publish/collect_look.py | 2 +- openpype/tools/mayalookassigner/arnold_standin.py | 4 ++++ 2 files 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 b01160a1c0..287ddc228b 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -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 diff --git a/openpype/tools/mayalookassigner/arnold_standin.py b/openpype/tools/mayalookassigner/arnold_standin.py index 3290944df9..392fe32148 100644 --- a/openpype/tools/mayalookassigner/arnold_standin.py +++ b/openpype/tools/mayalookassigner/arnold_standin.py @@ -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)