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
path: root/source
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-01-15 17:51:33 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-01-15 17:51:49 +0300
commitd571e9055a0a81f4bd1fd9f574b81783d3f648fd (patch)
tree160df33228e6769015bacb3031520674667a8960 /source
parent2ff3877f71fb0e8c806cdd02825ebdf7d6b8b9cc (diff)
Fluid: Fix T72971
Incorporated suggestions from the task discussion
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/fluid.c1
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 1900f6ebaad..1bd86f3c690 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4268,7 +4268,6 @@ void BKE_fluid_domain_type_set(Object *object, FluidDomainSettings *settings, in
BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_LEFT, 0);
BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_TOP, 0);
BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_BOTTOM, 0);
- BKE_fluid_particles_set(settings, FLUID_DOMAIN_PARTICLE_FLIP, 0);
object->dt = OB_SOLID;
}
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 53fa863f6da..2e7170a32d6 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -176,6 +176,12 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p
mmd = (FluidModifierData *)modifiers_findByType(ob, eModifierType_Fluid);
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_FLIP);
+ /* Only create a particle system in liquid domain mode. */
+ if (mmd->domain->type != FLUID_DOMAIN_TYPE_LIQUID) {
+ rna_Fluid_reset(bmain, scene, ptr);
+ return;
+ }
+
if (ob->type == OB_MESH && !exists) {
rna_Fluid_parts_create(bmain,
ptr,
@@ -1330,7 +1336,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, domain_types);
RNA_def_property_enum_funcs(prop, NULL, "rna_Fluid_domaintype_set", NULL);
RNA_def_property_ui_text(prop, "Domain Type", "Change domain type of the simulation");
- RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_reset");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_flip_parts_update");
/* smoke domain options */