@@ -125,6 +125,8 @@ void AnimationPlayer::_validate_property(PropertyInfo &p_property) const {
125125 }
126126
127127 p_property.hint_string = hint;
128+ } else if (!auto_capture && p_property.name .begins_with (" playback_auto_capture_" )) {
129+ p_property.usage = PROPERTY_USAGE_NONE;
128130 }
129131}
130132
@@ -372,7 +374,7 @@ void AnimationPlayer::play_backwards(const StringName &p_name, double p_custom_b
372374
373375void AnimationPlayer::play (const StringName &p_name, double p_custom_blend, float p_custom_scale, bool p_from_end) {
374376 if (auto_capture) {
375- play_with_capture (p_name, - 1.0 , p_custom_blend, p_custom_scale, p_from_end);
377+ play_with_capture (p_name, auto_capture_duration , p_custom_blend, p_custom_scale, p_from_end, auto_capture_transition_type, auto_capture_ease_type );
376378 } else {
377379 _play (p_name, p_custom_blend, p_custom_scale, p_from_end);
378380 }
@@ -716,12 +718,37 @@ double AnimationPlayer::get_blend_time(const StringName &p_animation1, const Str
716718
717719void AnimationPlayer::set_auto_capture (bool p_auto_capture) {
718720 auto_capture = p_auto_capture;
721+ notify_property_list_changed ();
719722}
720723
721724bool AnimationPlayer::is_auto_capture () const {
722725 return auto_capture;
723726}
724727
728+ void AnimationPlayer::set_auto_capture_duration (double p_auto_capture_duration) {
729+ auto_capture_duration = p_auto_capture_duration;
730+ }
731+
732+ double AnimationPlayer::get_auto_capture_duration () const {
733+ return auto_capture_duration;
734+ }
735+
736+ void AnimationPlayer::set_auto_capture_transition_type (Tween::TransitionType p_auto_capture_transition_type) {
737+ auto_capture_transition_type = p_auto_capture_transition_type;
738+ }
739+
740+ Tween::TransitionType AnimationPlayer::get_auto_capture_transition_type () const {
741+ return auto_capture_transition_type;
742+ }
743+
744+ void AnimationPlayer::set_auto_capture_ease_type (Tween::EaseType p_auto_capture_ease_type) {
745+ auto_capture_ease_type = p_auto_capture_ease_type;
746+ }
747+
748+ Tween::EaseType AnimationPlayer::get_auto_capture_ease_type () const {
749+ return auto_capture_ease_type;
750+ }
751+
725752#ifdef TOOLS_ENABLED
726753void AnimationPlayer::get_argument_options (const StringName &p_function, int p_idx, List<String> *r_options) const {
727754 const String pf = p_function;
@@ -814,6 +841,12 @@ void AnimationPlayer::_bind_methods() {
814841
815842 ClassDB::bind_method (D_METHOD (" set_auto_capture" , " auto_capture" ), &AnimationPlayer::set_auto_capture);
816843 ClassDB::bind_method (D_METHOD (" is_auto_capture" ), &AnimationPlayer::is_auto_capture);
844+ ClassDB::bind_method (D_METHOD (" set_auto_capture_duration" , " auto_capture_duration" ), &AnimationPlayer::set_auto_capture_duration);
845+ ClassDB::bind_method (D_METHOD (" get_auto_capture_duration" ), &AnimationPlayer::get_auto_capture_duration);
846+ ClassDB::bind_method (D_METHOD (" set_auto_capture_transition_type" , " auto_capture_transition_type" ), &AnimationPlayer::set_auto_capture_transition_type);
847+ ClassDB::bind_method (D_METHOD (" get_auto_capture_transition_type" ), &AnimationPlayer::get_auto_capture_transition_type);
848+ ClassDB::bind_method (D_METHOD (" set_auto_capture_ease_type" , " auto_capture_ease_type" ), &AnimationPlayer::set_auto_capture_ease_type);
849+ ClassDB::bind_method (D_METHOD (" get_auto_capture_ease_type" ), &AnimationPlayer::get_auto_capture_ease_type);
817850
818851 ClassDB::bind_method (D_METHOD (" play" , " name" , " custom_blend" , " custom_speed" , " from_end" ), &AnimationPlayer::play, DEFVAL (StringName ()), DEFVAL (-1 ), DEFVAL (1.0 ), DEFVAL (false ));
819852 ClassDB::bind_method (D_METHOD (" play_backwards" , " name" , " custom_blend" ), &AnimationPlayer::play_backwards, DEFVAL (StringName ()), DEFVAL (-1 ));
@@ -856,6 +889,9 @@ void AnimationPlayer::_bind_methods() {
856889
857890 ADD_GROUP (" Playback Options" , " playback_" );
858891 ADD_PROPERTY (PropertyInfo (Variant::BOOL, " playback_auto_capture" ), " set_auto_capture" , " is_auto_capture" );
892+ ADD_PROPERTY (PropertyInfo (Variant::FLOAT, " playback_auto_capture_duration" , PROPERTY_HINT_NONE, " suffix:s" ), " set_auto_capture_duration" , " get_auto_capture_duration" );
893+ ADD_PROPERTY (PropertyInfo (Variant::INT, " playback_auto_capture_transition_type" , PROPERTY_HINT_ENUM, " Linear,Sine,Quint,Quart,Expo,Elastic,Cubic,Circ,Bounce,Back,Spring" ), " set_auto_capture_transition_type" , " get_auto_capture_transition_type" );
894+ ADD_PROPERTY (PropertyInfo (Variant::INT, " playback_auto_capture_ease_type" , PROPERTY_HINT_ENUM, " In,Out,InOut,OutIn" ), " set_auto_capture_ease_type" , " get_auto_capture_ease_type" );
859895 ADD_PROPERTY (PropertyInfo (Variant::FLOAT, " playback_default_blend_time" , PROPERTY_HINT_RANGE, " 0,4096,0.01,suffix:s" ), " set_default_blend_time" , " get_default_blend_time" );
860896
861897 ADD_PROPERTY (PropertyInfo (Variant::FLOAT, " speed_scale" , PROPERTY_HINT_RANGE, " -4,4,0.001,or_less,or_greater" ), " set_speed_scale" , " get_speed_scale" );
0 commit comments