[Bf-blender-cvs] [44b4cf6] soc-2014-fluid: noise field name var

Roman Pogribnyi noreply at git.blender.org
Sun Jun 8 13:20:53 CEST 2014


Commit: 44b4cf699dc0ed9f4a2842d304c96580a42b0c59
Author: Roman Pogribnyi
Date:   Fri Jun 6 23:42:23 2014 +0200
https://developer.blender.org/rB44b4cf699dc0ed9f4a2842d304c96580a42b0c59

noise field name var

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

M	intern/smoke/intern/MANTA.h

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

diff --git a/intern/smoke/intern/MANTA.h b/intern/smoke/intern/MANTA.h
index b20523f..bc7a345 100644
--- a/intern/smoke/intern/MANTA.h
+++ b/intern/smoke/intern/MANTA.h
@@ -81,20 +81,20 @@ extern "C" void read_mantaflow_sim(struct FLUID_3D *fluid, char *name)
 #	endif	/*zlib*/
 }
 
-static void manta_gen_noise(stringstream& ss, bool clamp, int clampNeg, int clampPos, float valScale, float valOffset, float timeAnim)
+static void manta_gen_noise(stringstream& ss, char *noise, bool clamp, int clampNeg, int clampPos, float valScale, float valOffset, float timeAnim)
 {
 	if (ss == NULL)/*should never be here*/
 	{
 		return;
 	}
-	ss << "noise = s.create(NoiseField) \n";
-	ss << "noise.posScale = vec3(45) \n";
-	ss << "noise.clamp = " << ((clamp)?"True":"False") << " \n";
-	ss << "noise.clampNeg = " << clampNeg << " \n";
-	ss << "noise.clampPos = " << clampPos << " \n";
-	ss << "noise.valScale = " << valScale << " \n";
-	ss << "noise.valOffset = " << valOffset << " \n";
-	ss << "noise.timeAnim = " << timeAnim << " \n";
+	ss << noise << " = s.create(NoiseField) \n";
+	ss << noise << ".posScale = vec3(45) \n";
+	ss << noise << ".clamp = " << ((clamp)?"True":"False") << " \n";
+	ss << noise << ".clampNeg = " << clampNeg << " \n";
+	ss << noise << ".clampPos = " << clampPos << " \n";
+	ss << noise << ".valScale = " << valScale << " \n";
+	ss << noise << ".valOffset = " << valOffset << " \n";
+	ss << noise << ".timeAnim = " << timeAnim << " \n";
 }
 
 static void manta_solve_pressure(stringstream& ss, char *flags, char *vel, char *pressure, bool useResNorms, int openBound, int solver_res)
@@ -167,7 +167,7 @@ static void generate_manta_sim_file(Scene *scene, SmokeModifierData *smd)
 	ss << "pressure = s.create(RealGrid) \n";/*must always be present*/
 
 /*Noise Field*/
-	manta_gen_noise(ss, true, 0, 1, 1, 0.75, 0.2);
+	manta_gen_noise(ss, "noise", true, 0, 1, 1, 0.75, 0.2);
 	
 /*Flow setup*/
 	ss << "flags.initDomain() \n";




More information about the Bf-blender-cvs mailing list