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 ;)

This commit is contained in:
Daniel Genrich 2008-04-28 17:02:55 +00:00
parent 2a3d159b06
commit 23660800b6

@ -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! */