Fix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier handles getting stretched unreasonably
Patch by Alexander Gavrilov (angavrilov) Reviewed by Joshua Leung (aligorith)
This commit is contained in:
parent
c53c8df6d9
commit
c105c59bb4
Notes:
blender-bot
2023-02-14 11:35:46 +01:00
Referenced by issue #46037, Moving keys in NLA tweak mode on offset action strip can break some bezier curves.
|
@ -998,9 +998,9 @@ short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data,
|
|||
totmatch++;
|
||||
|
||||
if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode, flip);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else {
|
||||
paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode, flip);
|
||||
|
|
|
@ -1586,9 +1586,9 @@ static void snap_action_keys(bAnimContext *ac, short mode)
|
|||
ED_masklayer_snap_frames(ale->data, ac->scene, mode);
|
||||
}
|
||||
else if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else {
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
|
@ -1700,9 +1700,9 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
|
|||
/* TODO */
|
||||
}
|
||||
else if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else {
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
|
|
|
@ -2115,9 +2115,9 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
|
|||
|
||||
/* perform snapping */
|
||||
if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
|
@ -2252,9 +2252,9 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
|
|||
|
||||
/* perform actual mirroring */
|
||||
if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else
|
||||
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
|
||||
|
|
|
@ -3390,9 +3390,9 @@ static void posttrans_action_clean(bAnimContext *ac, bAction *act)
|
|||
AnimData *adt = ANIM_nla_mapping_get(ac, ale);
|
||||
|
||||
if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
|
||||
posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
|
||||
}
|
||||
else
|
||||
posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */
|
||||
|
@ -6039,9 +6039,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
|
|||
((canceled == 0) || (duplicate)) )
|
||||
{
|
||||
if (adt) {
|
||||
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0);
|
||||
posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */
|
||||
ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
|
||||
ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 0);
|
||||
}
|
||||
else
|
||||
posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */
|
||||
|
|
Loading…
Reference in New Issue