diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-06-24 19:38:56 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-06-24 19:38:56 +0300 |
commit | c2ab069dfca3c2c82313d7f5d2fa2c0a97dbe514 (patch) | |
tree | b0ee5938eeee4f18edf4914df491bf2be6c467f4 | |
parent | ac0852cea0d607b97de1930841fadb1ac1b019e9 (diff) |
Fluid: Use OpenVDB as the default cache format for liquids too
With the updated OpenVDB setup, it is now perfectly fine to use OpenVDB for liquid domains.
-rw-r--r-- | release/scripts/startup/bl_operators/object_quick_effects.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 12 |
2 files changed, 7 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 59b66b427f1..311631ac65f 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -399,6 +399,9 @@ class QuickSmoke(ObjectModeOperator, Operator): if self.style == 'FIRE' or self.style == 'BOTH': obj.modifiers[-1].domain_settings.use_noise = True + # ensure correct cache file format for smoke + obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB' + # Setup material # Cycles and Eevee @@ -511,7 +514,8 @@ class QuickLiquid(Operator): obj.modifiers[-1].domain_settings.use_collision_border_top = True obj.modifiers[-1].domain_settings.use_collision_border_bottom = True - # set correct cache file format for liquid + # ensure correct cache file formats for liquid + obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB' obj.modifiers[-1].domain_settings.cache_mesh_format = 'BOBJECT' # change domain type, will also allocate and show particle system for FLIP diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 103c3bb119d..98573ea98ec 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4583,13 +4583,9 @@ void BKE_fluid_particles_set(FluidDomainSettings *settings, int value, bool clea void BKE_fluid_domain_type_set(Object *object, FluidDomainSettings *settings, int type) { - /* Set common values for liquid/smoke domain: cache type, - * border collision and viewport draw-type. */ + /* Set values for border collision: + * Liquids should have a closed domain, smoke domains should be open. */ if (type == FLUID_DOMAIN_TYPE_GAS) { - BKE_fluid_cachetype_mesh_set(settings, FLUID_DOMAIN_FILE_BIN_OBJECT); - BKE_fluid_cachetype_data_set(settings, FLUID_DOMAIN_FILE_UNI); - BKE_fluid_cachetype_particle_set(settings, FLUID_DOMAIN_FILE_UNI); - BKE_fluid_cachetype_noise_set(settings, FLUID_DOMAIN_FILE_UNI); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_FRONT, 1); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_BACK, 1); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_RIGHT, 1); @@ -4599,10 +4595,6 @@ void BKE_fluid_domain_type_set(Object *object, FluidDomainSettings *settings, in object->dt = OB_WIRE; } else if (type == FLUID_DOMAIN_TYPE_LIQUID) { - BKE_fluid_cachetype_mesh_set(settings, FLUID_DOMAIN_FILE_BIN_OBJECT); - BKE_fluid_cachetype_data_set(settings, FLUID_DOMAIN_FILE_UNI); - BKE_fluid_cachetype_particle_set(settings, FLUID_DOMAIN_FILE_UNI); - BKE_fluid_cachetype_noise_set(settings, FLUID_DOMAIN_FILE_UNI); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_FRONT, 0); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_BACK, 0); BKE_fluid_collisionextents_set(settings, FLUID_DOMAIN_BORDER_RIGHT, 0); |