[Bf-blender-cvs] [e3f8c887fb5] blender-v2.82-release: Fix T73567: Mantaflow adaptative domain takes objects with the flow turned off into account

Sebastián Barschkis noreply at git.blender.org
Tue Feb 4 12:02:16 CET 2020


Commit: e3f8c887fb528fb495e12d4da5ded6be1ecc6154
Author: Sebastián Barschkis
Date:   Tue Feb 4 12:01:46 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBe3f8c887fb528fb495e12d4da5ded6be1ecc6154

Fix T73567: Mantaflow adaptative domain takes objects with the flow turned off into account

This is a small optimization that makes sure the adaptive domain only considers active inflow objects. Ones with disabled fluid flow are skipped and thus the adaptive domain will not try to cover them.

===================================================================

M	source/blender/blenkernel/intern/fluid.c

===================================================================

diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 91adbf2301d..f35aebbae16 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -2432,6 +2432,11 @@ static void update_flowsfluids(struct Depsgraph *depsgraph,
       int subframes = mfs->subframes;
       EmissionMap *em = &emaps[flow_index];
 
+      /* Optimization: Skip flow objects with disabled inflow flag. */
+      if (mfs->behavior == FLUID_FLOW_BEHAVIOR_INFLOW &&
+          (mfs->flags & FLUID_FLOW_USE_INFLOW) == 0) {
+        continue;
+      }
       /* Optimization: No need to compute emission value if it won't be applied. */
       if (mfs->behavior == FLUID_FLOW_BEHAVIOR_GEOMETRY && !is_first_frame) {
         continue;



More information about the Bf-blender-cvs mailing list