[8a51178df98] blender-v2.91-release: Fix: Animation, Draw active keyframe handles only when Bézier

Sybren A. Stüvel noreply at git.blender.org
Mon Oct 26 13:52:26 CET 2020


Commit: 8a51178df987418433593d8692246585fa7220cd
Author: Sybren A. Stüvel
Date:   Fri Oct 23 16:32:51 2020 +0200
Branches: blender-v2.91-release
https://developer.blender.org/rB8a51178df987418433593d8692246585fa7220cd

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