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>2013-03-19 18:53:46 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-03-19 18:53:46 +0400
commit57cc2fd4a0f49cadf2577cd7a184dd11351fa4d6 (patch)
tree6727e6bde6a7fb4c0dad5ee56748f8ac3a33889f /source/blender
parent7cba869a94c6394a4b1db06eee368ed9f43b8e23 (diff)
Fix for an old issue: Node names need to be unique to ensure proper preview image mapping (node instance keys are generated from node names). This caused problems with some of the old test files (e.g. compo_map_zcombine_cubes.blend).
When the uniqueness requirement was introduced in r24478 (2.50.8) for unambiguous RNA paths for animation a do_versions check was also added, but this was incorrectly only applied to main->nodetree (i.e. node groups) and not local trees in scene, material, etc.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenloader/intern/readfile.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index d03c631f7a1..c6b02bc8361 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 266
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
/* 262 was the last editmesh release but it has compatibility code for bmesh data */
#define BLENDER_MINVERSION 262
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fdd34eb2475..1f399f10766 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9027,6 +9027,26 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ if (!MAIN_VERSION_ATLEAST(main, 266, 3)) {
+ {
+ /* Fix for a very old issue:
+ * Node names were nominally made unique in r24478 (2.50.8), but the do_versions check
+ * to update existing node names only applied to main->nodetree (i.e. group nodes).
+ * Uniqueness is now required for proper preview mapping,
+ * so do this now to ensure old files don't break.
+ */
+ bNode *node;
+ FOREACH_NODETREE(main, ntree, id) {
+ if (id == &ntree->id)
+ continue; /* already fixed for node groups */
+
+ for (node = ntree->nodes.first; node; node = node->next)
+ nodeUniqueName(ntree, node);
+ }
+ FOREACH_NODETREE_END
+ }
+ }
+
if (main->versionfile < 267) {
/* TIP: to initialize new variables added, use the new function