From c2722344e052565413914a6e7118024d03dee745 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Sep 2023 20:38:18 +0800 Subject: [PATCH] update attribute should be correct --- openpype/hosts/max/api/pipeline.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/openpype/hosts/max/api/pipeline.py b/openpype/hosts/max/api/pipeline.py index d9a66c60f52..72163f5ecf5 100644 --- a/openpype/hosts/max/api/pipeline.py +++ b/openpype/hosts/max/api/pipeline.py @@ -197,19 +197,20 @@ def import_custom_attribute_data(container: str, selections: list): rt.addModifier(container, modifier) container.modifiers[0].name = "OP Data" rt.custAttributes.add(container.modifiers[0], attrs) - nodes = {} + node_list = [] + sel_list = [] for i in selections: - nodes = { - str(i): rt.NodeTransformMonitor(node=i), - } + node_ref = rt.NodeTransformMonitor(node=i) + node_list.append(node_ref) + sel_list.append(str(i)) + # Setting the property rt.setProperty( container.modifiers[0].openPypeData, - "all_handles", nodes.values()) + "all_handles", node_list) rt.setProperty( container.modifiers[0].openPypeData, - "sel_list", nodes.keys()) - + "sel_list", sel_list) def update_custom_attribute_data(container: str, selections: list): """Updating the Openpype/AYON custom parameter built by the creator