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:
authorSebastián Barschkis <sebbas@sebbas.org>2020-03-04 19:23:09 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-03-04 20:46:48 +0300
commit6958ec3f7fc23b0ad605c0cfbdbb38417e89f81f (patch)
tree864d104ad32ae399abc4d609bce5455c0b7d0f8f /source/blender
parentb32fd73b244a5c72b46926ffc1d20e3796fc2138 (diff)
Fluid: Added an option to delete fluid inside obstacles
Simple checkbox that - if enabled - will tell the solver to clear density or liquid particles in obstacle cells.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesdna/DNA_fluid_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index e12bee13ebc..783babdaa1c 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -41,6 +41,7 @@ enum {
FLUID_DOMAIN_USE_SPEED_VECTORS = (1 << 11), /* Generate mesh speed vectors. */
FLUID_DOMAIN_EXPORT_MANTA_SCRIPT = (1 << 12), /* Export mantaflow script during bake. */
FLUID_DOMAIN_USE_FRACTIONS = (1 << 13), /* Use second order obstacles. */
+ FLUID_DOMAIN_DELETE_IN_OBSTACLE = (1 << 14), /* Delete fluid inside obstacles. */
};
/* Border collisions. */
@@ -494,7 +495,7 @@ enum {
FLUID_FLOW_USE_PART_SIZE = (1 << 4),
/* Control when to apply inflow. */
FLUID_FLOW_USE_INFLOW = (1 << 5),
- /* Control when to apply inflow. */
+ /* Control how to initialize flow objects. */
FLUID_FLOW_USE_PLANE_INIT = (1 << 6),
};
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index d4bc02bbf3e..7edb1cfaa81 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -2539,6 +2539,11 @@ static void rna_def_fluid_effector_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Is Planar", "Treat this object as a planar, unclosed mesh");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
+ prop = RNA_def_property(srna, "delete_in_obstacle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_DELETE_IN_OBSTACLE);
+ RNA_def_property_ui_text(prop, "Clear In Obstacle", "Delete fluid inside obstacles");
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
+
prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vel_multi");
RNA_def_property_range(prop, -100.0, 100.0);