Merge pull request #109986 from SomeRanDev/animation_node_state_machine_playback_expansion

Expose `get_fading_...` methods for `AnimationNodeStateMachinePlayback`
This commit is contained in:
Thaddeus Crews
2025-10-28 12:19:20 -05:00
4 changed files with 34 additions and 6 deletions

View File

@ -334,11 +334,11 @@ float AnimationNodeStateMachinePlayback::get_current_length() const {
return current_nti.length;
}
float AnimationNodeStateMachinePlayback::get_fade_from_play_pos() const {
float AnimationNodeStateMachinePlayback::get_fading_from_play_pos() const {
return fadeing_from_nti.position;
}
float AnimationNodeStateMachinePlayback::get_fade_from_length() const {
float AnimationNodeStateMachinePlayback::get_fading_from_length() const {
return fadeing_from_nti.length;
}
@ -1215,6 +1215,10 @@ void AnimationNodeStateMachinePlayback::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_play_position"), &AnimationNodeStateMachinePlayback::get_current_play_pos);
ClassDB::bind_method(D_METHOD("get_current_length"), &AnimationNodeStateMachinePlayback::get_current_length);
ClassDB::bind_method(D_METHOD("get_fading_from_node"), &AnimationNodeStateMachinePlayback::get_fading_from_node);
ClassDB::bind_method(D_METHOD("get_fading_from_play_position"), &AnimationNodeStateMachinePlayback::get_fading_from_play_pos);
ClassDB::bind_method(D_METHOD("get_fading_from_length"), &AnimationNodeStateMachinePlayback::get_fading_from_length);
ClassDB::bind_method(D_METHOD("get_fading_position"), &AnimationNodeStateMachinePlayback::get_fading_pos);
ClassDB::bind_method(D_METHOD("get_fading_length"), &AnimationNodeStateMachinePlayback::get_fading_time);
ClassDB::bind_method(D_METHOD("get_travel_path"), &AnimationNodeStateMachinePlayback::_get_travel_path);
ADD_SIGNAL(MethodInfo(SceneStringName(state_started), PropertyInfo(Variant::STRING_NAME, "state")));

View File

@ -340,8 +340,8 @@ public:
float get_current_play_pos() const;
float get_current_length() const;
float get_fade_from_play_pos() const;
float get_fade_from_length() const;
float get_fading_from_play_pos() const;
float get_fading_from_length() const;
float get_fading_time() const;
float get_fading_pos() const;