[Bf-blender-cvs] [5361339] master: Temporary fix for NLA strips not getting drawn in tweakmode with multiple strips selected

Joshua Leung noreply at git.blender.org
Tue Apr 14 08:40:26 CEST 2015


Commit: 5361339ba0590abe2220a65efa53ca48b2813974
Author: Joshua Leung
Date:   Tue Apr 14 16:48:34 2015 +1200
Branches: master
https://developer.blender.org/rB5361339ba0590abe2220a65efa53ca48b2813974

Temporary fix for NLA strips not getting drawn in tweakmode with multiple strips selected

When entering tweakmode on multiple strips (from different AnimData blocks)
simultaneously, only the track containing the last selected strip would be
shown. All the other tracks with strips being tweaked would not appear at
all.

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

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

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

diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index ee662c4..25f2b0b 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1301,8 +1301,22 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop
 		 *	- active track should still get shown though (even though it has disabled flag set)
 		 */
 		// FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel
-		if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && !(nlt->flag & NLATRACK_ACTIVE))
-			continue;
+		if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED)) {
+			/* NOTE: The tweaking track may not be active, if strips from different AnimData blocks
+			 *       entered tweakmode at the same time. Since this loop works both ways, we can't
+			 *       just stop on the first disabled track we encounter...
+			 */
+			if (nlt->flag & NLATRACK_ACTIVE) {
+				/* OK = "the" active track */
+			}
+			else if (BLI_findindex(&nlt->strips, adt->actstrip) != -1) {
+				/* OK = this is the one containing the active strip */
+			}
+			else {
+				/* Not OK - neither of the previous two were met, so it must be one of the "later" ones */
+				continue;
+			}
+		}
 		
 		/* only work with this channel and its subchannels if it is editable */
 		if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_NLT(nlt)) {




More information about the Bf-blender-cvs mailing list