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-26 15:52:12 +0300
commit8a51178df987418433593d8692246585fa7220cd (patch)
tree577a066b418b61828118df092eb12317279ebf02
parentd62309a20e4855cc0feaf5aa78046d5dc8be638f (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.
-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();