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
This commit is contained in:
parent
7c7b7302d3
commit
c03d8a17f1
Notes:
blender-bot
2023-12-22 20:14:11 +01:00
Referenced by issue #41077, dope sheet's column select (alt + click) gets ignored
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue