Revision: 55113 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55113 Author: aligorith Date: 2013-03-08 10:59:43 +0000 (Fri, 08 Mar 2013) Log Message: ----------- Applying similar optimisations as r.55092 for Animation Data
Modified Paths: -------------- trunk/blender/source/blender/blenloader/intern/writefile.c Modified: trunk/blender/source/blender/blenloader/intern/writefile.c =================================================================== --- trunk/blender/source/blender/blenloader/intern/writefile.c 2013-03-08 09:09:48 UTC (rev 55112) +++ trunk/blender/source/blender/blenloader/intern/writefile.c 2013-03-08 10:59:43 UTC (rev 55113) @@ -470,6 +470,9 @@ { FModifier *fcm; + /* Write all modifiers first (for faster reloading) */ + writelist(wd, DATA, "FModifier", fmodifiers); + /* Modifiers */ for (fcm= fmodifiers->first; fcm; fcm= fcm->next) { FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); @@ -510,9 +513,6 @@ break; } } - - /* Write the modifier */ - writestruct(wd, DATA, "FModifier", 1, fcm); } } @@ -520,10 +520,8 @@ { FCurve *fcu; + writelist(wd, DATA, "FCurve", fcurves); for (fcu=fcurves->first; fcu; fcu=fcu->next) { - /* F-Curve */ - writestruct(wd, DATA, "FCurve", 1, fcu); - /* curve data */ if (fcu->bezt) writestruct(wd, DATA, "BezTriple", fcu->totvert, fcu->bezt); @@ -541,9 +539,8 @@ writestruct(wd, DATA, "ChannelDriver", 1, driver); /* variables */ - for (dvar= driver->variables.first; dvar; dvar= dvar->next) { - writestruct(wd, DATA, "DriverVar", 1, dvar); - + writelist(wd, DATA, "DriverVar", &driver->variables); + for (dvar= driver->variables.first; dvar; dvar= dvar->next) { DRIVER_TARGETS_USED_LOOPER(dvar) { if (dtar->rna_path) @@ -609,10 +606,8 @@ { NlaStrip *strip; + writelist(wd, DATA, "NlaStrip", strips); for (strip= strips->first; strip; strip= strip->next) { - /* write the strip first */ - writestruct(wd, DATA, "NlaStrip", 1, strip); - /* write the strip's F-Curves and modifiers */ write_fcurves(wd, &strip->fcurves); write_fmodifiers(wd, &strip->modifiers); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs