diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-12-23 15:54:47 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-12-23 17:48:38 +0300 |
commit | 635694c0ff8fc5c9828bf920ecb81bb9bf792a82 (patch) | |
tree | bf2c3166130710a5a460753f5e6eedd9348c08ea /source/blender/makesrna | |
parent | 5cfda8e7f74da959a5c1081d45e7608bef95191d (diff) |
Fluid: Added new viscosity solver
Mainly updated the Mantaflow version. It includes the new viscosity solver plugin based on the method from 'Accurate Viscous Free Surfaces for Buckling, Coiling, and Rotating Liquids' (Batty & Bridson).
In the UI, this update adds a new 'Viscosity' section to the fluid modifier UI (liquid domains only). For now, there is a single 'strength' value to control the viscosity of liquids.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index bb8280ede91..afe564dff0a 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -1929,6 +1929,22 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) "Maximum number of fluid particles that are allowed in this simulation"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); + /* viscosity options */ + + prop = RNA_def_property(srna, "use_viscosity", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_VISCOSITY); + RNA_def_property_ui_text(prop, "Use Viscosity", "Enable fluid viscosity settings"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); + + prop = RNA_def_property(srna, "viscosity_value", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0, 10.0); + RNA_def_property_ui_range(prop, 0.0, 5.0, 0.01, 3); + RNA_def_property_ui_text(prop, + "Strength", + "Viscosity of liquid (higher values result in more viscous fluids, a " + "value of 0 will still apply some viscosity)"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); + /* diffusion options */ prop = RNA_def_property(srna, "use_diffusion", PROP_BOOLEAN, PROP_NONE); |