Fix T90872: Dopesheet messes up keyframe handles

Y coordinate was not being constrained.

Caused by {rBb0d9e6797fb866e7a58876c7977c98a190070310}
This commit is contained in:
Germano Cavalcante 2021-08-23 09:46:30 -03:00
parent b4b3f518aa
commit 2f0e350ffd
Notes: blender-bot 2023-02-14 11:18:07 +01:00
Referenced by issue #90896, Objects scale weirdly when moving around keyframes in dopesheet/action-editor
Referenced by issue #90872, Dopesheet mangles keyframes
1 changed files with 7 additions and 2 deletions

View File

@ -158,8 +158,9 @@ static void TimeToTransData(
/* Setup #TransData. */
td->loc = time; /* Usually #td2d->loc is used here. But this is for when the original location is
not float[3]. */
copy_v3_v3(td->iloc, td->loc);
td->val = time;
td->ival = td->iloc[0] = *(time);
td->ival = *(time);
td->center[0] = td->ival;
td->center[1] = ypos;
@ -615,7 +616,11 @@ void recalcData_actedit(TransInfo *t)
if ((autosnap != SACTSNAP_OFF) && (t->state != TRANS_CANCEL) && !(td->flag & TD_NOTIMESNAP)) {
transform_snap_anim_flush_data(t, td, autosnap, td->loc);
}
transform_convert_flush_handle2D(td, td2d, 1.0f);
/* Constrain Y. */
td->loc[1] = td->iloc[1];
transform_convert_flush_handle2D(td, td2d, 0.0f);
}
if (ac.datatype != ANIMCONT_MASK) {