diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-02 18:05:12 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-02 18:05:12 +0100 |
commit | 2f2ed95aa840c37bb0cb77f5bf2d6c85afcb2e63 (patch) | |
tree | 4b962248896706fec785b08d3a1bd91579ad325a | |
parent | 4566e968399c33b1aa224fd6edcaa00682648558 (diff) | |
parent | d96fca371b54ef53292191f92e45ed18012c0445 (diff) | |
download | redot-engine-2f2ed95aa840c37bb0cb77f5bf2d6c85afcb2e63.tar.gz |
Merge pull request #85540 from KoBeWi/update_reset
Copy track update mode when adding reset key
-rw-r--r-- | editor/animation_track_editor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 8268cf10ae..9504cac9bb 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -6038,6 +6038,12 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { existing_idx = reset->track_find_key(dst_track, 0, Animation::FIND_MODE_APPROX); } + if (animation->track_get_type(sk.track) == Animation::TYPE_VALUE) { + undo_redo->add_do_method(reset.ptr(), "value_track_set_update_mode", dst_track, animation->value_track_get_update_mode(sk.track)); + undo_redo->add_do_method(reset.ptr(), "track_set_interpolation_type", dst_track, animation->track_get_interpolation_type(sk.track)); + undo_redo->add_do_method(reset.ptr(), "track_set_interpolation_loop_wrap", dst_track, animation->track_get_interpolation_loop_wrap(sk.track)); + } + undo_redo->add_do_method(reset.ptr(), "track_insert_key", dst_track, 0, animation->track_get_key_value(sk.track, sk.key), animation->track_get_key_transition(sk.track, sk.key)); undo_redo->add_undo_method(reset.ptr(), "track_remove_key_at_time", dst_track, 0); |