[Bf-blender-cvs] [c03d8a1] master: Bugfix T41077: Dope sheet's column select (alt + click) gets ignored with NLA Strips

Joshua Leung noreply at git.blender.org
Sun Jul 20 07:20:44 CEST 2014


Commit: c03d8a17f11ae75cf207053231bb59325630606a
Author: Joshua Leung
Date:   Sun Jul 20 17:17:21 2014 +1200
https://developer.blender.org/rBc03d8a17f11ae75cf207053231bb59325630606a

Bugfix T41077: Dope sheet's column select (alt + click) gets ignored with NLA Strips

NLA mapping corrections were being applied twice, causing column select to fail

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

M	source/blender/editors/space_action/action_select.c

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

diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index cf18cff..ddfca98 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1086,8 +1086,9 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
 	View2D *v2d = &ac->ar->v2d;
 	bDopeSheet *ads = NULL;
 	int channel_index;
-	short found = 0;
-	float selx = 0.0f;
+	bool found = false;
+	float frame = 0.0f; /* frame of keyframe under mouse - NLA corrections not applied/included */
+	float selx = 0.0f;  /* frame of keyframe under mouse */
 	float x, y;
 	rctf rectf;
 	
@@ -1179,7 +1180,8 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
 				 * requiring to map each frame once again...
 				 */
 				selx = BKE_nla_tweakedit_remap(adt, ak->cfra, NLATIME_CONVERT_UNMAP);
-				found = 1;
+				frame = ak->cfra;
+				found = true;
 				break;
 			}
 			else if (ak->cfra < rectf.xmin)
@@ -1258,8 +1260,11 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
 		if (found) {
 			/* apply selection to keyframes */
 			if (column) {
-				/* select all keyframes in the same frame as the one we hit on the active channel */
-				actkeys_mselect_column(ac, select_mode, selx);
+				/* select all keyframes in the same frame as the one we hit on the active channel 
+				 * [T41077]: "frame" not "selx" here (i.e. no NLA corrections yet) as the code here
+				 *            does that itself again as it needs to work on multiple datablocks 
+				 */
+				actkeys_mselect_column(ac, select_mode, frame);
 			}
 			else if (same_channel) {
 				/* select all keyframes in the active channel */




More information about the Bf-blender-cvs mailing list