Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Vepsalainen <bebraw@gmail.com>2008-01-08 22:06:46 +0300
committerJuho Vepsalainen <bebraw@gmail.com>2008-01-08 22:06:46 +0300
commit2630c2c9f3ff191587c5ff380ead82e63fdc843e (patch)
tree256822e79c27e3802e725f1f6183b53dfc5d2f9e /source/blender/src/editnode.c
parent5b6f97797053bda88fd5ff5f33200e0130d11003 (diff)
Minor changes to node rename tool
Rename was changed to work on the last selected node. Also size of a couple of character arrays was changed to avoid buffer overflows. Custom name shows up now just fine in group header in case it is being edited as it did not before.
Diffstat (limited to 'source/blender/src/editnode.c')
-rw-r--r--source/blender/src/editnode.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/src/editnode.c b/source/blender/src/editnode.c
index 07d77747fac..645dc77c337 100644
--- a/source/blender/src/editnode.c
+++ b/source/blender/src/editnode.c
@@ -1089,21 +1089,17 @@ void node_rename(SpaceNode *snode)
{
bNode *node, *rename_node;
short found_node= 0;
-
- /* don't rename if more than one node is selected */
- /* a nice alternative for this would be to rename last selected node */
+
+ /* check if a node is selected */
for(node= snode->edittree->nodes.first; node; node= node->next) {
if(node->flag & SELECT) {
- if(found_node) {
- error("Can rename only one selected node at time");
- return;
- }
- rename_node= node;
found_node= 1;
+ break;
}
}
if(found_node) {
+ rename_node= nodeGetActive(snode->edittree);
node_rename_but((char *)rename_node->username);
BIF_undo_push("Rename Node");