diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-23 21:49:26 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-04-23 21:49:26 +0400 |
commit | 9afdda36893276321f7da9af94babf7a5b7b62fe (patch) | |
tree | f7c2d18620ecc0107d489f51fa0fd7273b9890a8 /source/blender/editors/space_node | |
parent | d119b5b197adc979ab437750212a882e41283065 (diff) |
Another little fix for #35010. Added better labeling for node groups, so it's possible to see which node group type the sockets in the node tree view belong to. Otherwise would be virtually impossible to use it.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 5be47e5ef6e..bac7791af2a 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -433,7 +433,8 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) NodeLinkItem *items; int totitems; char name[UI_MAX_NAME_STR]; - int i, j, num = 0; + const char *cur_node_name = NULL; + int i, num = 0; if (compatibility && !(ntype->compatibility & compatibility)) continue; @@ -449,7 +450,6 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) if (ui_compatible_sockets(items[i].socket_type, sock->type)) num++; - j = 0; for (i = 0; i < totitems; ++i) { if (!ui_compatible_sockets(items[i].socket_type, sock->type)) continue; @@ -466,14 +466,14 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) } if (num > 1) { - if (j == 0) { - uiItemL(column, IFACE_(items[i].node_name), ICON_NODE); + if (!cur_node_name || !STREQ(cur_node_name, items[i].node_name)) { + cur_node_name = items[i].node_name; + uiItemL(column, IFACE_(cur_node_name), ICON_NODE); but = block->buttons.last; but->flag = UI_TEXT_LEFT; } BLI_snprintf(name, UI_MAX_NAME_STR, " %s", IFACE_(items[i].socket_name)); - j++; } else BLI_strncpy(name, IFACE_(items[i].node_name), UI_MAX_NAME_STR); |