Revision: 44377
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44377
Author:   blendix
Date:     2012-02-23 15:10:26 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Fix #30298: fluid simulation from older files not working when loaded into 2.62,
this was due to a wrong version patch which leaves simulation speed to 0.

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   2012-02-23 
15:10:10 UTC (rev 44376)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2012-02-23 
15:10:26 UTC (rev 44377)
@@ -13130,23 +13130,6 @@
                }
        }
        
-       if (main->versionfile < 261 || (main->versionfile == 261 && 
main->subversionfile < 4))
-       {
-               {
-                       /* set fluidsim rate */
-                       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_Fluidsim) 
{
-                                               FluidsimSettings *fss = 
(FluidsimSettings *)md;
-                                               fss->animRate = 1.0f;
-                                       }
-                               }
-                       }
-               }
-       }
-
        if (main->versionfile < 262)
        {
                Object *ob;
@@ -13163,6 +13146,25 @@
                }
        }
 
+       if (main->versionfile < 263)
+       {
+               /* set fluidsim rate. the version patch for this in 2.62 was 
wrong, so
+                  try to correct it, if rate is 0.0 that's likely not 
intentional */
+               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_Fluidsim) {
+                                       FluidsimModifierData *fmd = 
(FluidsimModifierData *)md;
+                                       if(fmd->fss->animRate == 0.0f)
+                                               fmd->fss->animRate = 1.0f;
+                               }
+                       }
+               }
+       }
+
+
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! 
*/
        /* WATCH IT 2!: Userdef struct init has to be in 
editors/interface/resources.c! */
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to