[Bf-blender-cvs] [b2b7b3f] master: NLA Editor Bugfix: Select NLA tracks too when selecting strips

Joshua Leung noreply at git.blender.org
Fri May 9 06:17:19 CEST 2014


Commit: b2b7b3f796fb850ff3dadaa3b751b1936eb47bf6
Author: Joshua Leung
Date:   Fri May 9 16:17:04 2014 +1200
https://developer.blender.org/rBb2b7b3f796fb850ff3dadaa3b751b1936eb47bf6

NLA Editor Bugfix: Select NLA tracks too when selecting strips

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

M	source/blender/editors/space_nla/nla_select.c

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

diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index d459213..3e7a6f4 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -575,14 +575,6 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s
 		
 		/* deselect all other channels first */
 		ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
-		
-		/* Highlight NLA-Track */
-		if (ale->type == ANIMTYPE_NLATRACK) {
-			NlaTrack *nlt = (NlaTrack *)ale->data;
-			
-			nlt->flag |= NLATRACK_SELECTED;
-			ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
-		}
 	}
 	
 	/* only select strip if we clicked on a valid channel and hit something */
@@ -594,10 +586,21 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s
 			
 			/* if we selected it, we can make it active too
 			 *	- we always need to clear the active strip flag though... 
+			 *  - as well as selecting its track...
 			 */
 			deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0);
-			if (strip->flag & NLASTRIP_FLAG_SELECT)
+			
+			if (strip->flag & NLASTRIP_FLAG_SELECT) {
 				strip->flag |= NLASTRIP_FLAG_ACTIVE;
+				
+				/* Highlight NLA-Track */
+				if (ale->type == ANIMTYPE_NLATRACK) {
+					NlaTrack *nlt = (NlaTrack *)ale->data;
+					
+					nlt->flag |= NLATRACK_SELECTED;
+					ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK);
+				}
+			}
 		}
 		
 		/* free this channel */




More information about the Bf-blender-cvs mailing list