diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-30 02:09:03 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-30 11:52:05 +0300 |
commit | 8bdf191461a6a09c71258e69246d13fa3034e357 (patch) | |
tree | fb760a106c1d371914f69a3866f8d0da3be7c682 /source | |
parent | e3e5d595f61251372eea1f6ffa262734d68f3181 (diff) |
Fluid: Added APIC simulation method
Basic support for velocity updates with the APIC method.
This commit adds APIC to the already existing dropdown menu for the simulation method. The APIC plugin within Mantaflow has been updated to the latest version.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index fa1b1997625..af4b98e1c8d 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4993,6 +4993,7 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd, tfds->fractions_threshold = fds->fractions_threshold; tfds->fractions_distance = fds->fractions_distance; tfds->sys_particle_maximum = fds->sys_particle_maximum; + tfds->simulation_method = fds->simulation_method; /* diffusion options*/ tfds->surface_tension = fds->surface_tension; diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 60eed60ace1..02ae71e3b3d 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -1456,8 +1456,16 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem simulation_methods[] = { - {FLUID_DOMAIN_METHOD_FLIP, "FLIP", 0, "FLIP", "Use FLIP as the simulation method"}, - /*{FLUID_DOMAIN_METHOD_APIC, "APIC", 0, "APIC", "Use APIC as the simulation method"},*/ + {FLUID_DOMAIN_METHOD_FLIP, + "FLIP", + 0, + "FLIP", + "Use FLIP as the simulation method (more splashy behavior)"}, + {FLUID_DOMAIN_METHOD_APIC, + "APIC", + 0, + "APIC", + "Use APIC as the simulation method (more energetic and stable behavior)"}, {0, NULL, 0, NULL, NULL}, }; @@ -1820,6 +1828,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "simulation_method"); RNA_def_property_enum_items(prop, simulation_methods); RNA_def_property_ui_text(prop, "Simulation Method", "Change the underlying simulation method"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_data_reset"); prop = RNA_def_property(srna, "flip_ratio", PROP_FLOAT, PROP_NONE); |