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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-07-04 16:16:01 +0400
committerJoshua Leung <aligorith@gmail.com>2010-07-04 16:16:01 +0400
commitace570cb1024f0b3affd48b2f2104af3048d1707 (patch)
treef05e28af8071d1145878085f9dbf535c30bc0d71 /source
parentf9933b2fee786c0ba6341da0f151581fd768c921 (diff)
Fix for 15-day-old bug causing crashes when loading old 2.49 files, especially those with animation.
Reverting 29563 ("* Moved do_versions_ipos_to_animato from blender.c to readfile.c, where it should be.") part to the original version that (so far) is guaranteed to work fine. While this means that "nice software design" isn't obeyed once again, this works and the other approach doesn't. So far there really isn't anything really obviously different between the approaches, even after trying a few different placements of the version patches within the file-reading internals.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/blender.c6
-rw-r--r--source/blender/blenloader/intern/readfile.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 134d49cdf24..9a97d975ede 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -64,6 +64,7 @@
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
+#include "BKE_ipo.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
@@ -286,6 +287,11 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
//setscreen(G.curscreen);
}
+ // FIXME: this version patching should really be part of the file-reading code,
+ // but we still get too many unrelated data-corruption crashes otherwise...
+ if (G.main->versionfile < 250)
+ do_versions_ipos_to_animato(G.main);
+
if(recover && bfd->filename[0] && G.relbase_valid) {
/* in case of autosave or quit.blend, use original filename instead
* use relbase_valid to make sure the file is saved, else we get <memory2> in the filename */
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 50a56c74cf5..cefc6edb5a3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10953,13 +10953,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* don't forget to set version number in blender.c! */
}
+#if 0 // XXX: disabled for now... we still don't have this in the right place in the loading code for it to work
static void do_versions_after_linking(FileData *fd, Library *lib, Main *main)
{
- /* old Animation System (using IPO's) needs to be converted to the new Animato system
- */
+ /* old Animation System (using IPO's) needs to be converted to the new Animato system */
if(main->versionfile < 250)
do_versions_ipos_to_animato(main);
}
+#endif
static void lib_link_all(FileData *fd, Main *main)
{
@@ -11107,7 +11108,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filename)
blo_join_main(&fd->mainlist);
lib_link_all(fd, bfd->main);
- do_versions_after_linking(fd, NULL, bfd->main);
+ //do_versions_after_linking(fd, NULL, bfd->main); // XXX: not here (or even in this function at all)! this causes crashes on many files - Aligorith (July 04, 2010)
lib_verify_nodetree(bfd->main, 1);
fix_relpaths_library(fd->relabase, bfd->main); /* make all relative paths, relative to the open blend file */