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
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-02-04 14:01:46 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-02-04 14:02:05 +0300
commite3f8c887fb528fb495e12d4da5ded6be1ecc6154 (patch)
treef057695d7ef5f8d8b55116507c0c22a84f23c714 /source/blender/blenkernel/intern/fluid.c
parent2264590d8cc959a6c05c10e91b20ea818c56ff73 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/fluid.c')
-rw-r--r--source/blender/blenkernel/intern/fluid.c5
1 files changed, 5 insertions, 0 deletions
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;