diff options
Diffstat (limited to 'source/blender/editors/space_node/node_add.c')
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 82a315366dc..a28d467df2e 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -339,7 +339,25 @@ static bNodeTree *node_add_group_get_and_poll_group_node_tree(Main *bmain, if (!node_group) { return NULL; } - if ((node_group->type != ntree->type) || !nodeGroupPoll(ntree, node_group)) { + + const char *disabled_hint = NULL; + if ((node_group->type != ntree->type) || !nodeGroupPoll(ntree, node_group, &disabled_hint)) { + if (disabled_hint) { + BKE_reportf(op->reports, + RPT_ERROR, + "Can not add node group '%s' to '%s':\n %s", + node_group->id.name + 2, + ntree->id.name + 2, + disabled_hint); + } + else { + BKE_reportf(op->reports, + RPT_ERROR, + "Can not add node group '%s' to '%s'", + node_group->id.name + 2, + ntree->id.name + 2); + } + return NULL; } |