From 93526b4c72f76f8d8d382a11e7d0f8e4f21c4a7c Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 15 Feb 2012 18:17:31 +0000 Subject: readfile update after version/subversion bump Note, there is no need to leave doversion code outside a version/subversion nest. e.g. having if version < 262 in a 2.61 file will make the code to double-run. however this is the same case for the code nested outside the if versions ... with the advantage of making ahoys/version bumping easier. Ton himself was unaware of how we were doing this and suggested to get rid of the /* put subversion code here */ practise. --- source/blender/blenloader/intern/readfile.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5f737ea4e53..ff737339835 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13062,20 +13062,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - - /* put compatibility code here until next subversion bump */ + + if (main->versionfile < 262) { - { - Object *ob; - for(ob=main->object.first; ob; ob= ob->id.next) { - ModifierData *md; + Object *ob; + for(ob=main->object.first; ob; ob= ob->id.next) { + ModifierData *md; - for (md=ob->modifiers.first; md; md=md->next) { - if (md->type==eModifierType_Cloth) { - ClothModifierData *clmd = (ClothModifierData*) md; - if(clmd->sim_parms) - clmd->sim_parms->vel_damping = 1.0f; - } + for (md=ob->modifiers.first; md; md=md->next) { + if (md->type==eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData*) md; + if(clmd->sim_parms) + clmd->sim_parms->vel_damping = 1.0f; } } } -- cgit v1.2.3