diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-07-20 09:17:21 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-07-20 09:19:46 +0400 |
commit | c03d8a17f11ae75cf207053231bb59325630606a (patch) | |
tree | c619879be40d4675dc50656b0d84c057b5250bdc /source/blender | |
parent | 7c7b7302d33b9a43f5436589a726bc733be91a33 (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_action/action_select.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index cf18cffefb6..ddfca98a119 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 */ |