[Bf-blender-cvs] [1c34825b4f1] master: Hair child: Use clamp function to clamp curve evaluation

Sergey Sharybin noreply at git.blender.org
Wed Feb 14 11:42:28 CET 2018


Commit: 1c34825b4f1b8dbc658c60120dacb2600936bdd9
Author: Sergey Sharybin
Date:   Wed Feb 14 11:36:46 2018 +0100
Branches: master
https://developer.blender.org/rB1c34825b4f1b8dbc658c60120dacb2600936bdd9

Hair child: Use clamp function to clamp curve evaluation

Avoids redundant calls to the curve evaluation.

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

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

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

diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index bfcda89a635..667d51b3536 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -565,7 +565,7 @@ static float do_clump_level(float result[3], const float co[3], const float par_
 	float clump = 0.0f;
 	
 	if (clumpcurve) {
-		clump = pa_clump * (1.0f - CLAMPIS(curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f));
+		clump = pa_clump * (1.0f - clamp_f(curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f));
 		
 		interp_v3_v3v3(result, co, par_co, clump);
 	}
@@ -655,7 +655,7 @@ static void do_rough_curve(const float loc[3], float mat[4][4], float time, floa
 	if (!roughcurve)
 		return;
 	
-	fac *= CLAMPIS(curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f);
+	fac *= clamp_f(curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f);
 	
 	copy_v3_v3(rco, loc);
 	mul_v3_fl(rco, time);



More information about the Bf-blender-cvs mailing list