From da54eb2e0590b11085612a5fbe3a7b1ab6acfd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Mon, 18 Sep 2023 16:35:40 +0200 Subject: [PATCH] Node Wrangler: `ui_items` collection renamed to `items_tree`. --- node_wrangler/operators.py | 6 +++--- node_wrangler/utils/nodes.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/node_wrangler/operators.py b/node_wrangler/operators.py index 19c346e99..1d59fe996 100644 --- a/node_wrangler/operators.py +++ b/node_wrangler/operators.py @@ -509,7 +509,7 @@ class NWPreviewNode(Operator, NWBase): @classmethod def get_output_sockets(cls, node_tree): - return [socket for socket in node_tree.interface.ui_items if socket.in_out in {'OUTPUT', 'BOTH'}] + return [socket for socket in node_tree.interface.items_tree if socket.in_out in {'OUTPUT', 'BOTH'}] def ensure_viewer_socket(self, node, socket_type, connect_socket=None): # check if a viewer output already exists in a node group otherwise create @@ -586,7 +586,7 @@ class NWPreviewNode(Operator, NWBase): next_node = link.from_node external_socket = link.from_socket if hasattr(next_node, "node_tree"): - for socket_index, socket in enumerate(next_node.node_tree.interface.ui_items): + for socket_index, socket in enumerate(next_node.node_tree.interface.items_tree): if socket.identifier == external_socket.identifier: break if is_viewer_socket(socket) and socket not in sockets: @@ -611,7 +611,7 @@ class NWPreviewNode(Operator, NWBase): def remove_socket(cls, tree, socket): interface = tree.interface interface.remove(socket) - interface.active_index = min(interface.active_index, len(interface.ui_items) - 1) + interface.active_index = min(interface.active_index, len(interface.items_tree) - 1) def link_leads_to_used_socket(self, link): # return True if link leads to a socket that is already used in this material diff --git a/node_wrangler/utils/nodes.py b/node_wrangler/utils/nodes.py index bf8c263de..75a1fd98b 100644 --- a/node_wrangler/utils/nodes.py +++ b/node_wrangler/utils/nodes.py @@ -170,11 +170,11 @@ def get_internal_socket(socket): # get the internal socket from a socket inside or outside the group node = socket.node if node.type == 'GROUP_OUTPUT': - iterator = node.id_data.interface.ui_items + iterator = node.id_data.interface.items_tree elif node.type == 'GROUP_INPUT': - iterator = node.id_data.interface.ui_items + iterator = node.id_data.interface.items_tree elif hasattr(node, "node_tree"): - iterator = node.node_tree.interface.ui_items + iterator = node.node_tree.interface.items_tree else: return None -- 2.30.2