[Bf-blender-cvs] [0f3da2016d0] fluid-mantaflow: Mantaflow: Update for new outflow flag

Sebastián Barschkis noreply at git.blender.org
Sat Apr 6 22:13:17 CEST 2019


Commit: 0f3da2016d0111ac6e0522720d7f7c350af8d680
Author: Sebastián Barschkis
Date:   Tue Nov 6 16:10:52 2018 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rB0f3da2016d0111ac6e0522720d7f7c350af8d680

Mantaflow: Update for new outflow flag

Trigger outflow object allocation when active outflow objects present in scene

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

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

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

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 7416c451206..b231c1ed47c 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2545,6 +2545,9 @@ static void update_flowsflags(SmokeDomainSettings *sds, Object **flowobjs, int n
 			if (sfs->flags & FLUID_FLOW_INITVELOCITY) {
 				active_fields |= FLUID_DOMAIN_ACTIVE_INVEL;
 			}
+			if (sfs->behavior == FLUID_FLOW_BEHAVIOR_OUTFLOW) {
+				active_fields |= FLUID_DOMAIN_ACTIVE_OUTFLOW;
+			}
 			/* activate heat field if flow produces any heat */
 			if (sfs->temp && sds->type == FLUID_DOMAIN_TYPE_GAS) {
 				active_fields |= FLUID_DOMAIN_ACTIVE_HEAT;
@@ -2584,6 +2587,9 @@ static void update_flowsflags(SmokeDomainSettings *sds, Object **flowobjs, int n
 	if (active_fields & FLUID_DOMAIN_ACTIVE_INVEL) {
 		fluid_ensure_invelocity(sds->fluid, sds->smd);
 	}
+	if (active_fields & FLUID_DOMAIN_ACTIVE_OUTFLOW) {
+		fluid_ensure_outflow(sds->fluid, sds->smd);
+	}
 	if (active_fields & FLUID_DOMAIN_ACTIVE_HEAT) {
 		smoke_ensure_heat(sds->fluid, sds->smd);
 	}



More information about the Bf-blender-cvs mailing list