[Bf-blender-cvs] [f0c17c7] fluid-mantaflow: added high res liquid phi grid getter

Sebastián Barschkis noreply at git.blender.org
Thu Jun 9 00:08:11 CEST 2016


Commit: f0c17c75995186d471f9022b066c06985f36ba72
Author: Sebastián Barschkis
Date:   Wed Jun 8 22:28:15 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBf0c17c75995186d471f9022b066c06985f36ba72

added high res liquid phi grid getter

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

M	intern/mantaflow/extern/manta_smoke_API.h
M	intern/mantaflow/intern/SMOKE.cpp
M	intern/mantaflow/intern/manta_smoke_API.cpp

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

diff --git a/intern/mantaflow/extern/manta_smoke_API.h b/intern/mantaflow/extern/manta_smoke_API.h
index 442e0b8..e343cb2 100644
--- a/intern/mantaflow/extern/manta_smoke_API.h
+++ b/intern/mantaflow/extern/manta_smoke_API.h
@@ -89,6 +89,7 @@ float *smoke_get_inflow_grid(struct SMOKE *smoke);
 float *smoke_get_fuel_inflow(struct SMOKE *smoke);
 
 float *liquid_get_phi(struct SMOKE *liquid);
+float *liquid_turbulence_get_phi(struct SMOKE *liquid);
 void liquid_ensure_init(struct SMOKE *smoke, struct SmokeModifierData *smd);
 
 
diff --git a/intern/mantaflow/intern/SMOKE.cpp b/intern/mantaflow/intern/SMOKE.cpp
index 5ac180a..53b4e75 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -197,8 +197,8 @@ void SMOKE::initSmoke(SmokeModifierData *smd)
 
 void SMOKE::initSmokeHigh(SmokeModifierData *smd)
 {
-	std::string tmpString = solver_high
-		+ alloc_base_grids_high
+	std::string tmpString = alloc_base_grids_high
+		+ smoke_variables_high
 		+ uv_setup
 		+ prep_domain_high
 		+ wavelet_turbulence_noise
@@ -584,10 +584,10 @@ void SMOKE::exportScript(SmokeModifierData *smd)
 	
 	// Setup high
 	if (smd->domain->flags & MOD_SMOKE_HIGHRES) {
-		manta_script +=
-			solver_high +
-			uv_setup +
-			alloc_base_grids_high;
+		manta_script += solver_high
+			+ smoke_variables_high
+			+ uv_setup
+			+ alloc_base_grids_high;
 	}
 	
 	// Add color grids high if needed
diff --git a/intern/mantaflow/intern/manta_smoke_API.cpp b/intern/mantaflow/intern/manta_smoke_API.cpp
index 9342570..fc8d61e 100644
--- a/intern/mantaflow/intern/manta_smoke_API.cpp
+++ b/intern/mantaflow/intern/manta_smoke_API.cpp
@@ -372,6 +372,11 @@ extern "C" float *smoke_turbulence_get_flame(SMOKE *smoke)
 	return (smoke && smoke->usingHighRes()) ? smoke->getFlameHigh() : NULL;
 }
 
+extern "C" float *liquid_turbulence_get_phi(SMOKE *liquid)
+{
+	return (liquid && liquid->usingHighRes()) ? liquid->getPhiHigh() : NULL;
+}
+
 extern "C" void smoke_turbulence_get_res(SMOKE *smoke, int *res)
 {
 	if (smoke && smoke->usingHighRes()) {




More information about the Bf-blender-cvs mailing list