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-03-05 14:35:50 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-03-05 14:36:00 +0300
commitcd0a6ff5c45382fa5620dc6dbf089e2909e38a78 (patch)
treea2786bebd5526d9015b303dc21ed6ebc74f8a867 /source
parent4d3da4e1d060232382df1414e0c99a094a9b1a28 (diff)
Fluid: Diffusion settings now optional
For optimization purposes these settings need to be enabled explicitly from now on.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_fluid_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index 56ad9246109..12b1ac2b06d 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -42,6 +42,7 @@ enum {
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. */
+ FLUID_DOMAIN_USE_DIFFUSION = (1 << 15), /* Use diffusion (e.g. viscosity, surface tension). */
};
/* Border collisions. */
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 7b6ca8b2273..750831668b7 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1563,6 +1563,13 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
/* diffusion options */
+ prop = RNA_def_property(srna, "use_diffusion", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_DIFFUSION);
+ RNA_def_property_ui_text(
+ prop, "Use Diffusion", "Enable fluid diffusion settings (e.g. viscosity, surface tension)");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
+
prop = RNA_def_property(srna, "surface_tension", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(