Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2020-06-02 16:51:27 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-06-04 10:49:05 +0300
commitf9892bd6cf13a19343691bfa2a13e554b1d34c17 (patch)
tree4f4766c33b421d73e34edfcac52b640a248f9d35 /source/blender/makesrna/intern/rna_fluid.c
parent244ed645e08e73083d9cecfb74cf06da2910db78 (diff)
Fix T77264: Mantaflow: Liquid checkbox doesn't turn on while switching
between fluid types When switching to gas, the fluids were not actually destroyed, leading to the situation that they were then destroyed when actually switching to liquid. Maniphest Tasks: T77264 Differential Revision: https://developer.blender.org/D7907
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluid.c')
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 93c7c1f3480..43d2234ddf2 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -227,8 +227,11 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p
mmd = (FluidModifierData *)BKE_modifiers_findby_type(ob, eModifierType_Fluid);
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_FLIP);
- /* Only create a particle system in liquid domain mode. */
+ /* Only create a particle system in liquid domain mode.
+ * Remove any remainings of a liquid sim when switching to gas. */
if (mmd->domain->type != FLUID_DOMAIN_TYPE_LIQUID) {
+ rna_Fluid_parts_delete(ptr, PART_FLUID_FLIP);
+ mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_FLIP;
rna_Fluid_domain_reset(bmain, scene, ptr);
return;
}