diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-12 22:16:05 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-12 22:20:32 +0300 |
commit | 5bf11286423bc1278d00a237415cc2b572d082ab (patch) | |
tree | 6169006cdf12aa99fd1e39b2591782a50a39b982 /source/blender/editors/animation/keyframes_draw.c | |
parent | e333765d3ec207e62dc9049adbed5153a4026e04 (diff) |
Dope Sheet: fix hold highlighting for non-bezier interpolation.
The automatic highlighting of constant curve areas was checking that
the bezier handles are horizontal even if a non-bezier interpolation
mode was active. Conversely, it was highlighting based on just handles
with Elastic interpolation, which always generates movement.
Diffstat (limited to 'source/blender/editors/animation/keyframes_draw.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 8c3ecef5ae8..1941e98b865 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -332,8 +332,15 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, BezTriple *first_bezt */ if (IS_EQF(beztn->vec[1][1], prev->vec[1][1]) == 0) return; - if (IS_EQF(beztn->vec[1][1], beztn->vec[0][1]) == 0) return; - if (IS_EQF(prev->vec[1][1], prev->vec[2][1]) == 0) return; + /* Only check handles in case of actual bezier interpolation. */ + if (prev->ipo == BEZT_IPO_BEZ) { + if (IS_EQF(beztn->vec[1][1], beztn->vec[0][1]) == 0) return; + if (IS_EQF(prev->vec[1][1], prev->vec[2][1]) == 0) return; + } + /* This interpolation type induces movement even between identical keys. */ + else if (ELEM(prev->ipo, BEZT_IPO_ELASTIC)) { + return; + } } /* if there are no blocks already, just add as root */ |