[0d1b1c341f4] master: Fix: Animation, Draw active keyframe handles only when Bézier

Sybren A. Stüvel noreply at git.blender.org
Fri Oct 23 16:46:23 CEST 2020


Commit: 0d1b1c341f4fe386f0818978ff8df1a81e91cd50
Author: Sybren A. Stüvel
Date:   Fri Oct 23 16:32:51 2020 +0200
Branches: master
https://developer.blender.org/rB0d1b1c341f4fe386f0818978ff8df1a81e91cd50

Fix: Animation, Draw active keyframe handles only when Bézier

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.

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

M	source/blender/editors/space_graph/graph_draw.c

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

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();



More information about the Bf-blender-cvs mailing list