readfile update after version/subversion bump
authorDalai Felinto <dfelinto@gmail.com>
Wed, 15 Feb 2012 18:17:31 +0000 (18:17 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 15 Feb 2012 18:17:31 +0000 (18:17 +0000)
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

index 5f737ea..ff73733 100644 (file)
@@ -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;
                                }
                        }
                }