diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 5 |
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; } |