Fix #121463: Graph Editor Keyframe jump operator shifts keyframes #121483

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:121463 into main 2024-05-07 15:17:37 +02:00

View File

@ -2284,18 +2284,22 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
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)) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, false, true);
const bool success = find_closest_frame(fcu, current_frame, next, &closest_fcu_frame);
ANIM_nla_mapping_apply_fcurve(adt, fcu, true, true);
if (!success) {
continue;
}
if ((next && closest_fcu_frame < closest_frame) ||
(!next && closest_fcu_frame > closest_frame))
{
closest_frame = closest_fcu_frame;
found = true;
}
ANIM_nla_mapping_apply_fcurve(adt, fcu, true, true);
}
if (!found) {