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:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-04-28 21:02:55 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-04-28 21:02:55 +0400
commit23660800b6f5ad48f03ac7d840595fae07b9c794 (patch)
treef24a13e711a398627812b44ed470d0dde0f95b28 /source
parent2a3d159b06be1c19541f21f5591566c94ab2735c (diff)
Cloth: Old RC1 and RC2 files with cloth should open again and not crash (after the DNA rearrangement to fix a bug yesterday). But be carefull your settings get lost. Best thing to do: 1. write settings down, 2. open blend in new (>=17 subversion) blender and just save the file (and ignore warnings on the command line.) Take this as a good example why not to use svn blender versions for production purposes ;)
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fc3ffd2c6dc..007aaf5b48d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7593,6 +7593,31 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
idproperties_fix_group_lengths(main->brush);
idproperties_fix_group_lengths(main->particle);
}
+
+ /* only needed until old bad svn/RC1,2 files are saved with a > 17 version -dg */
+ if(main->versionfile == 245 && main->subversionfile < 17) {
+ ModifierData *md;
+ Object *ob;
+
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+ for(md=ob->modifiers.first; md; ) {
+ if(md->type==eModifierType_Cloth) {
+ ModifierData *next;
+ MEM_freeN(((ClothModifierData *)md)->sim_parms);
+ MEM_freeN(((ClothModifierData *)md)->coll_parms);
+ MEM_freeN(((ClothModifierData *)md)->point_cache);
+ ((ClothModifierData *)md)->sim_parms = NULL;
+ ((ClothModifierData *)md)->coll_parms = NULL;
+ ((ClothModifierData *)md)->point_cache = NULL;
+ next=md->next;
+ BLI_remlink(&ob->modifiers, md);
+ md = next;
+ }
+ else
+ md = md->next;
+ }
+ }
+ }
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */