[Bf-blender-cvs] [91ce13e90d] master: Fix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range

Joshua Leung noreply at git.blender.org
Fri Mar 3 13:24:41 CET 2017


Commit: 91ce13e90d58b7b8ba426c30e22c92eb17e0436d
Author: Joshua Leung
Date:   Sat Mar 4 01:24:21 2017 +1300
Branches: master
https://developer.blender.org/rB91ce13e90d58b7b8ba426c30e22c92eb17e0436d

Fix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range

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

M	source/blender/editors/space_nla/nla_draw.c

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

diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 5b3c062e16..93dcdbb5c0 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -290,7 +290,8 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc)
 		 *	- min y-val is yminc, max is y-maxc, so clamp in those regions
 		 */
 		for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) {
-			float y = evaluate_fcurve(fcu, cfra);    // assume this to be in 0-1 range
+			float y = evaluate_fcurve(fcu, cfra);
+			CLAMP(y, 0.0f, 1.0f);
 			glVertex2f(cfra, ((y * yheight) + yminc));
 		}
 		glEnd(); // GL_LINE_STRIP




More information about the Bf-blender-cvs mailing list