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.
This commit is contained in:
parent
e333765d3e
commit
5bf1128642
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue