From 0d1b1c341f4fe386f0818978ff8df1a81e91cd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 23 Oct 2020 16:32:51 +0200 Subject: =?UTF-8?q?Fix:=20Animation,=20Draw=20active=20keyframe=20handles?= =?UTF-8?q?=20only=20when=20B=C3=A9zier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Draw the handles for the active keyframe only when the interpolation type is set to Bézier. This now matches the behaviour of handles of regular (non-active) keyframes. --- source/blender/editors/space_graph/graph_draw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index d430e331b6c..2e33f3ef4c7 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -321,10 +321,12 @@ static void draw_fcurve_active_handle_vertices(const FCurve *fcu, immUniformColor3fvAlpha(active_col, 0.01f); /* Almost invisible - only keep for smoothness. */ immBeginAtMost(GPU_PRIM_POINTS, 2); - if ((bezt->f1 & SELECT)) { + const BezTriple *left_bezt = active_keyframe_index > 0 ? &fcu->bezt[active_keyframe_index - 1] : + bezt; + if (left_bezt->ipo == BEZT_IPO_BEZ && (bezt->f1 & SELECT)) { immVertex2fv(pos, bezt->vec[0]); } - if ((bezt->f3 & SELECT)) { + if (bezt->ipo == BEZT_IPO_BEZ && (bezt->f3 & SELECT)) { immVertex2fv(pos, bezt->vec[2]); } immEnd(); -- cgit v1.2.3