diff options
Diffstat (limited to 'source/blender/editors/space_node/node_group.c')
-rw-r--r-- | source/blender/editors/space_node/node_group.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index e1de4bfc21e..335e2f93ff3 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -679,8 +679,19 @@ static bool node_group_make_test_selected(bNodeTree *ntree, /* check poll functions for selected nodes */ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { if (node_group_make_use_node(node, gnode)) { - if (node->typeinfo->poll_instance && !node->typeinfo->poll_instance(node, ngroup)) { - BKE_reportf(reports, RPT_WARNING, "Can not add node '%s' in a group", node->name); + const char *disabled_hint = NULL; + if (node->typeinfo->poll_instance && + !node->typeinfo->poll_instance(node, ngroup, &disabled_hint)) { + if (disabled_hint) { + BKE_reportf(reports, + RPT_WARNING, + "Can not add node '%s' in a group:\n %s", + node->name, + disabled_hint); + } + else { + BKE_reportf(reports, RPT_WARNING, "Can not add node '%s' in a group", node->name); + } ok = false; break; } |