diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-03 07:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 07:54:10 +0200 |
commit | 8ab69153cabd5e37190f126641df51168e252165 (patch) | |
tree | f10b850f062ff33b62de7ab80fd76962bfd12e09 /scene | |
parent | c284ff131612283ff2bbc45beb153bc5a87cfad2 (diff) | |
parent | 4313a7bdc857e7e32a5c71b931e8c02b29416e3c (diff) |
Merge pull request #39968 from lordkettune/custom-tracks-fix
Fix custom tracks causing issues on reimport
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/animation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 014b773298..479d97aadc 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2577,7 +2577,10 @@ void Animation::copy_track(int p_track, Ref<Animation> p_to_animation) { p_to_animation->track_set_enabled(dst_track, track_is_enabled(p_track)); p_to_animation->track_set_interpolation_type(dst_track, track_get_interpolation_type(p_track)); p_to_animation->track_set_interpolation_loop_wrap(dst_track, track_get_interpolation_loop_wrap(p_track)); - p_to_animation->value_track_set_update_mode(dst_track, value_track_get_update_mode(p_track)); + if (track_get_type(p_track) == TYPE_VALUE) { + p_to_animation->value_track_set_update_mode(dst_track, value_track_get_update_mode(p_track)); + } + for (int i = 0; i < track_get_key_count(p_track); i++) { p_to_animation->track_insert_key(dst_track, track_get_key_time(p_track, i), track_get_key_value(p_track, i), track_get_key_transition(p_track, i)); } |