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.
This commit is contained in:
Sebastián Barschkis 2020-01-29 19:15:22 +01:00
parent a16eacf615
commit 76489fbe7c
Notes: blender-bot 2023-06-26 11:58:59 +02:00
Referenced by issue #73483, Mantaflow: Smoke inflow  in liquid domain emits liquid
1 changed files with 9 additions and 0 deletions

View File

@ -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 */