diff options
author | Juho Vepsalainen <bebraw@gmail.com> | 2008-01-07 22:38:01 +0300 |
---|---|---|
committer | Juho Vepsalainen <bebraw@gmail.com> | 2008-01-07 22:38:01 +0300 |
commit | aa1c0281c6df642d6c9673c00ac660a36a75f286 (patch) | |
tree | b062ce961329087d2791c118a5f84bfd944cf1cb /source/blender/src/header_node.c | |
parent | 7da95822f0fabf1b554c34f5bcd7c4d6dcb4ae24 (diff) |
Custom Names for Nodes
This commit makes it possible to add a custom name to a node. The feature can be
accessed either by using a menu or shortcut ctrl-r. It currently works only when
a single node is selected. Invoking the feature gives a popup menu in which a new
name can be entered. If the given name is not empty, it will be shown like
"(myCustomName) NodeName" in the node header.
This feature is particularly useful when documenting complex node setups.
I also fixed the size of blur node. It was too short before due to my previous
commit.
Thanks to David Millan Escriva for contribution!
Diffstat (limited to 'source/blender/src/header_node.c')
-rw-r--r-- | source/blender/src/header_node.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/src/header_node.c b/source/blender/src/header_node.c index 2b823bfae21..a00cbd1290b 100644 --- a/source/blender/src/header_node.c +++ b/source/blender/src/header_node.c @@ -23,7 +23,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): David Millan Escriva, Juho Vepsäläinen * * ***** END GPL LICENSE BLOCK ***** */ @@ -516,6 +516,9 @@ static void do_node_nodemenu(void *arg, int event) case 11: /* make link */ node_make_link(snode); break; + case 12: /* rename */ + node_rename(snode); + break; } if(fromlib==-1) error_libdata(); @@ -552,6 +555,7 @@ static uiBlock *node_nodemenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide/Unhide|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rename|Ctrl R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); |