Kick particle systems to force redistribution, needed for reliably
authorLukas Tönne <lukas.toenne@gmail.com>
Tue, 17 Mar 2015 10:04:44 +0000 (11:04 +0100)
committerLukas Tönne <lukas.toenne@gmail.com>
Tue, 17 Mar 2015 10:04:44 +0000 (11:04 +0100)
applying recent jitter fix.

source/blender/blenkernel/BKE_blender.h
source/blender/blenloader/intern/versioning_270.c

index dad7f1916a14d90dea90deee40ed4c53230b2614..eb6797ed4ddec8d5e37435889c3f8c1f5fd7e88c 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         274
-#define BLENDER_SUBVERSION      0
+#define BLENDER_SUBVERSION      1
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   5
index ab5c8ace430d8c88232f99c35dc428a7b76cc3bd..ee015fa5652d565c658337e287da512d9982ca1e 100644 (file)
@@ -655,4 +655,16 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                }
        }
 
+       if (!MAIN_VERSION_ATLEAST(main, 274, 1)) {
+               /* particle systems need to be forced to redistribute for jitter mode fix */
+               {
+                       Object *ob;
+                       ParticleSystem *psys;
+                       for (ob = main->object.first; ob; ob = ob->id.next) {
+                               for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+                                       psys->recalc |= PSYS_RECALC_RESET;
+                               }
+                       }
+               }
+       }
 }