Add auto_capture option to AnimationPlayer

This commit is contained in:
Silc Lizard (Tokage) Renew
2024-05-02 11:23:11 +09:00
parent a0b0b19043
commit 36abb55dd2
7 changed files with 113 additions and 65 deletions

View File

@ -2093,7 +2093,7 @@ Ref<AnimatedValuesBackup> AnimationMixer::apply_reset(bool p_user_initiated) {
void AnimationMixer::capture(const StringName &p_name, double p_duration, Tween::TransitionType p_trans_type, Tween::EaseType p_ease_type) {
ERR_FAIL_COND(!active);
ERR_FAIL_COND(!has_animation(p_name));
ERR_FAIL_COND(Math::is_zero_approx(p_duration));
ERR_FAIL_COND(p_duration <= 0);
Ref<Animation> reference_animation = get_animation(p_name);
if (!cache_valid) {