diff options
author | Miguel Porces <cmporces> | 2022-09-20 20:07:59 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-20 20:07:59 +0300 |
commit | 01a4d386066f6b262ec71e081764016a27243263 (patch) | |
tree | 151e3369bf6bd1dbdc86f345b38adc83f9a96262 /release | |
parent | 32b766223a1b2a562e657a729e7d9f2926d42417 (diff) |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/nodeitems_builtins.py | 5 |
1 files 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: |