[Bf-blender-cvs] [5bf11286423] blender2.8: Dope Sheet: fix hold highlighting for non-bezier interpolation.

Alexander Gavrilov noreply at git.blender.org
Fri Oct 12 21:40:19 CEST 2018


Commit: 5bf11286423bc1278d00a237415cc2b572d082ab
Author: Alexander Gavrilov
Date:   Fri Oct 12 22:16:05 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB5bf11286423bc1278d00a237415cc2b572d082ab

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.

===================================================================

M	source/blender/editors/animation/keyframes_draw.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list