[Bf-blender-cvs] [1f046e05b63] master: Fluid: Add versioning for fluid particle physics type
Sebastián Barschkis
noreply at git.blender.org
Sun Oct 18 20:41:07 CEST 2020
Commit: 1f046e05b63c58bf3fd131f3765e7cc82dac85fb
Author: Sebastián Barschkis
Date: Sun Oct 18 20:17:28 2020 +0200
Branches: master
https://developer.blender.org/rB1f046e05b63c58bf3fd131f3765e7cc82dac85fb
Fluid: Add versioning for fluid particle physics type
Setting this type is required to prevent fluid particles from being treated like physics particles. The actual fix for this was made in rB11a8a6d0e6b5.
===================================================================
M source/blender/blenloader/intern/versioning_290.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 453c6aa797c..5e6fdad8509 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -38,6 +38,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_particle_types.h"
#include "DNA_pointcloud_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_screen_types.h"
@@ -854,6 +855,13 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Ensure that particle systems generated by fluid modifier have correct phystype. */
+ LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) {
+ if ELEM (part->type, PART_FLUID_FLIP, PART_FLUID_SPRAY, PART_FLUID_BUBBLE, PART_FLUID_FOAM) {
+ part->phystype = PART_PHYS_NO;
+ }
+ }
}
/**
More information about the Bf-blender-cvs
mailing list