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:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-07-10 13:31:08 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-07-10 13:31:08 +0400
commit80867d76e54fee835e2cc865665a14943f99c610 (patch)
tree634a9bd78d64341a2581b384baeb5fe7a5f12704
parentf807c2a04c966f170b31661241776be07c625ace (diff)
Fix #32052, Conflicts in unique node names.
All node group operators which move nodes directly between bNodeTree->nodes lists now make sure the node names are indeed unique in their new environment (the node group tree or the parent tree).
-rw-r--r--source/blender/editors/space_node/node_edit.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 9a6906c43bc..7d76994c07a 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1157,6 +1157,9 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
BLI_remlink(&wgroup->nodes, node);
BLI_addtail(&ntree->nodes, node);
+ /* ensure unique node name in the nodee tree */
+ nodeUniqueName(ntree, node);
+
node->locx += gnode->locx;
node->locy += gnode->locy;
@@ -1370,6 +1373,9 @@ static int node_group_separate_selected(bNodeTree *ntree, bNode *gnode, int make
BLI_remlink(&ngroup->nodes, newnode);
BLI_addtail(&ntree->nodes, newnode);
+ /* ensure unique node name in the node tree */
+ nodeUniqueName(ntree, newnode);
+
newnode->locx += gnode->locx;
newnode->locy += gnode->locy;
}
@@ -3710,11 +3716,14 @@ static int node_group_make_insert_selected(bNodeTree *ntree, bNode *gnode)
BLI_remlink(&ntree->nodes, node);
BLI_addtail(&ngroup->nodes, node);
+ /* ensure unique node name in the ngroup */
+ nodeUniqueName(ngroup, node);
+
node->locx -= 0.5f * (min[0] + max[0]);
node->locy -= 0.5f * (min[1] + max[1]);
}
}
-
+
/* move animation data over */
if (ntree->adt) {
LinkData *ld, *ldn = NULL;