Fix T101424: Empty group node added to node add search
The group node type polls true, but adding an empty group node isn't useful, so just skip it.
This commit is contained in:
parent
f96b729d7b
commit
f63179cc9f
Notes:
blender-bot
2023-02-14 09:21:21 +01:00
Referenced by issue #101424, Regression: Node search menu exposes an empty node group
|
@ -178,6 +178,10 @@ static void gather_add_node_operations(const bContext &C,
|
|||
if (!(node_type->poll && node_type->poll(node_type, &node_tree, &disabled_hint))) {
|
||||
continue;
|
||||
}
|
||||
if ((StringRefNull(node_tree.typeinfo->group_idname) == node_type->idname)) {
|
||||
/* Skip the empty group type. */
|
||||
continue;
|
||||
}
|
||||
|
||||
AddNodeItem item{};
|
||||
item.ui_name = IFACE_(node_type->ui_name);
|
||||
|
@ -271,7 +275,7 @@ static void add_node_search_exec_fn(bContext *C, void *arg1, void *arg2)
|
|||
static ARegion *add_node_search_tooltip_fn(
|
||||
bContext *C, ARegion *region, const rcti *item_rect, void * /*arg*/, void *active)
|
||||
{
|
||||
const AddNodeItem *item = static_cast<AddNodeItem *>(active);
|
||||
const AddNodeItem *item = static_cast<const AddNodeItem *>(active);
|
||||
|
||||
uiSearchItemTooltipData tooltip_data{};
|
||||
|
||||
|
|
Loading…
Reference in New Issue