diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-29 21:15:22 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-29 21:21:52 +0300 |
commit | 76489fbe7c127504940cd6d7185e43f50629f1fa (patch) | |
tree | 7de1fef3e82bde2eb63dce813e052f670314be1b /source/blender/blenkernel | |
parent | a16eacf61500b2ec6188f1bf6128e914649c8d72 (diff) |
Fix T73483: Mantaflow: Smoke inflow in liquid domain emits liquid
Added an extra check in the flow object loop that compares flow object type and domain type prior to writing to flow maps.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 18eac2789a2..cb94a78e619 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -2453,6 +2453,15 @@ static void update_flowsfluids(struct Depsgraph *depsgraph, if (mfs->behavior == FLUID_FLOW_BEHAVIOR_GEOMETRY && !is_first_frame) { continue; } + /* Optimization: Skip flow object if it does not "belong" to this domain type. */ + if (mfs->type == FLUID_FLOW_TYPE_LIQUID && mds->type == FLUID_DOMAIN_TYPE_GAS) { + continue; + } + if ((mfs->type == FLUID_FLOW_TYPE_SMOKE || mfs->type == FLUID_FLOW_TYPE_FIRE || + mfs->type == FLUID_FLOW_TYPE_SMOKEFIRE) && + mds->type == FLUID_DOMAIN_TYPE_LIQUID) { + continue; + } /* Length of one adaptive frame. If using adaptive stepping, length is smaller than actual * frame length */ |