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

This commit is contained in:
Joshua Leung 2017-03-04 01:24:21 +13:00
parent c0d0ef142f
commit 91ce13e90d
Notes: blender-bot 2023-04-19 22:54:54 +02:00
Referenced by issue #50842, NLA influence curve is over
1 changed files with 2 additions and 1 deletions

View File

@ -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