Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-10-23 17:32:51 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-10-23 17:46:19 +0300
commit0d1b1c341f4fe386f0818978ff8df1a81e91cd50 (patch)
treef2efca7758cd14e6e7c8b2befddcb3d405d1bfd8 /source/blender/editors/space_graph
parent50c475e534805cb9c74e46be1b35c4d8cda46960 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_draw.c6
1 files changed, 4 insertions, 2 deletions
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();