From 15dd1e13b6e37dce8dbc8d1f5d0262ea3639f412 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 13 Jun 2023 19:00:37 +0800 Subject: [PATCH] removing the node references successfully in the parameter --- openpype/hosts/max/api/plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/max/api/plugin.py b/openpype/hosts/max/api/plugin.py index 6bf3756e72..3fa4fa55b1 100644 --- a/openpype/hosts/max/api/plugin.py +++ b/openpype/hosts/max/api/plugin.py @@ -56,6 +56,8 @@ MS_CUSTOM_ATTRIB = """attributes "openPypeData" if current_selection == undefined then return False temp_arr = #() i_node_arr = #() + new_temp_arr = #() + new_i_node_arr = #() for c in current_selection do ( @@ -65,15 +67,17 @@ MS_CUSTOM_ATTRIB = """attributes "openPypeData" if idx do ( DeleteItem all_nodes idx + for i in all_nodes do append new_i_node_arr i ) idx = finditem list_node.items handle_name if idx do ( DeleteItem list_node.items idx + for i in list_node.items do append new_temp_arr i ) ) - all_handles = i_node_arr - list_node.items = temp_arr + all_handles = new_i_node_arr + list_node.items = new_temp_arr ) on OPparams open do