Copy intrp/loop for all track & use_blend for audio when adding reset

This commit is contained in:
Silc Lizard (Tokage) Renew 2024-01-06 17:15:45 +09:00
parent 89cc635c05
commit 5ade1077ff

View file

@ -6075,9 +6075,12 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
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));
}
if (animation->track_get_type(sk.track) == Animation::TYPE_AUDIO) {
undo_redo->add_do_method(reset.ptr(), "audio_track_set_use_blend", dst_track, animation->audio_track_is_use_blend(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);