Revision: 14600
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14600
Author: genscher
Date: 2008-04-28 19:02:55 +0200 (Mon, 28 Apr 2008)
Log Message:
-----------
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 ;)
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2008-04-28
16:21:26 UTC (rev 14599)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2008-04-28
17:02:55 UTC (rev 14600)
@@ -7593,6 +7593,31 @@
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! */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs