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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user