[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56247] trunk/blender/source/blender/ editors/space_node/node_templates.c: Another little fix for #35010.
Lukas Toenne
lukas.toenne at googlemail.com
Tue Apr 23 19:49:29 CEST 2013
Revision: 56247
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56247
Author: lukastoenne
Date: 2013-04-23 17:49:26 +0000 (Tue, 23 Apr 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_node/node_templates.c
Modified: trunk/blender/source/blender/editors/space_node/node_templates.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_templates.c 2013-04-23 16:27:45 UTC (rev 56246)
+++ trunk/blender/source/blender/editors/space_node/node_templates.c 2013-04-23 17:49:26 UTC (rev 56247)
@@ -433,7 +433,8 @@
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 @@
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 @@
}
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);
More information about the Bf-blender-cvs
mailing list