Fix #110789: Apply NLA mapping when jumping to keys in the Graph Editor #110790

Merged
Christoph Lendenfeld merged 1 commits from ChrisLend/blender:fix_graph_keyframe_jump into main 2023-08-10 11:03:09 +02:00

View File

@ -2259,10 +2259,12 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
const float current_frame = BKE_scene_frame_get(scene);
LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
const FCurve *fcu = static_cast<const FCurve *>(ale->key_data);
FCurve *fcu = static_cast<FCurve *>(ale->key_data);
if (!fcu->bezt) {
continue;
}
AnimData *adt = ANIM_nla_mapping_get(&ac, ale);
ANIM_nla_mapping_apply_fcurve(adt, fcu, false, true);
float closest_fcu_frame;
if (!find_closest_frame(fcu, current_frame, next, &closest_fcu_frame)) {
continue;
@ -2272,6 +2274,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
closest_frame = closest_fcu_frame;
found = true;
}
ANIM_nla_mapping_apply_fcurve(adt, fcu, true, true);
}
if (!found) {