diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-03-03 15:24:21 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-03-03 15:24:21 +0300 |
commit | 91ce13e90d58b7b8ba426c30e22c92eb17e0436d (patch) | |
tree | a7994fb6d74402e1f0804317ae974ed88ce1edde /source | |
parent | c0d0ef142fce15b839c369e9f7413c36b72aa8cb (diff) |
Fix T50842: NLA Influence Curve draws out of bounds when it exceeds the 0-1 range
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 5b3c062e16d..93dcdbb5c02 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 |