From 01a4d386066f6b262ec71e081764016a27243263 Mon Sep 17 00:00:00 2001 From: Miguel Porces Date: Tue, 20 Sep 2022 12:07:59 -0500 Subject: Fix: Group input and output always show in node add menu In D10241, both NodeItems for NodeGroupInput and NodeGroupOutput in the were moved from their categories into the 'node_group_items' generator. As the NodeItem.poll() is called by the NodeCategory class and not by the NodeItem class, the poll functions associated with those NodeItems were never called. This should correct that. Differential Revision: https://developer.blender.org/D16013 --- release/scripts/startup/nodeitems_builtins.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index 9c0635d7bd4..d2188515e16 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -261,8 +261,9 @@ def node_group_items(context): yield NodeItemCustom(draw=group_tools_draw) - yield NodeItem("NodeGroupInput", poll=group_input_output_item_poll) - yield NodeItem("NodeGroupOutput", poll=group_input_output_item_poll) + if group_input_output_item_poll(context): + yield NodeItem("NodeGroupInput") + yield NodeItem("NodeGroupOutput") ntree = space.edit_tree if not ntree: -- cgit v1.2.3