Revision: 48794
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48794
Author:   lukastoenne
Date:     2012-07-10 09:31:08 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_node/node_edit.c

Modified: trunk/blender/source/blender/editors/space_node/node_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_edit.c 2012-07-10 
09:12:39 UTC (rev 48793)
+++ trunk/blender/source/blender/editors/space_node/node_edit.c 2012-07-10 
09:31:08 UTC (rev 48794)
@@ -1157,6 +1157,9 @@
                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 @@
                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 @@
                        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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to