You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Merge pull request #109986 from SomeRanDev/animation_node_state_machine_playback_expansion
Expose `get_fading_...` methods for `AnimationNodeStateMachinePlayback`
This commit is contained in:
@@ -40,12 +40,36 @@
|
|||||||
Returns the playback position within the current animation state.
|
Returns the playback position within the current animation state.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_fading_from_length" qualifiers="const">
|
||||||
|
<return type="float" />
|
||||||
|
<description>
|
||||||
|
Returns the playback state length of the node from [method get_fading_from_node]. Returns [code]0[/code] if no animation fade is occurring.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="get_fading_from_node" qualifiers="const">
|
<method name="get_fading_from_node" qualifiers="const">
|
||||||
<return type="StringName" />
|
<return type="StringName" />
|
||||||
<description>
|
<description>
|
||||||
Returns the starting state of currently fading animation.
|
Returns the starting state of currently fading animation.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_fading_from_play_position" qualifiers="const">
|
||||||
|
<return type="float" />
|
||||||
|
<description>
|
||||||
|
Returns the playback position of the node from [method get_fading_from_node]. Returns [code]0[/code] if no animation fade is occurring.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_fading_length" qualifiers="const">
|
||||||
|
<return type="float" />
|
||||||
|
<description>
|
||||||
|
Returns the length of the current fade animation. Returns [code]0[/code] if no animation fade is occurring.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="get_fading_position" qualifiers="const">
|
||||||
|
<return type="float" />
|
||||||
|
<description>
|
||||||
|
Returns the playback position of the current fade animation. Returns [code]0[/code] if no animation fade is occurring.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="get_travel_path" qualifiers="const">
|
<method name="get_travel_path" qualifiers="const">
|
||||||
<return type="StringName[]" />
|
<return type="StringName[]" />
|
||||||
<description>
|
<description>
|
||||||
|
|||||||
@@ -1760,8 +1760,8 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
|
|||||||
fading_from_node = playback->get_fading_from_node();
|
fading_from_node = playback->get_fading_from_node();
|
||||||
current_play_pos = playback->get_current_play_pos();
|
current_play_pos = playback->get_current_play_pos();
|
||||||
current_length = playback->get_current_length();
|
current_length = playback->get_current_length();
|
||||||
fade_from_current_play_pos = playback->get_fade_from_play_pos();
|
fade_from_current_play_pos = playback->get_fading_from_play_pos();
|
||||||
fade_from_length = playback->get_fade_from_length();
|
fade_from_length = playback->get_fading_from_length();
|
||||||
fading_time = playback->get_fading_time();
|
fading_time = playback->get_fading_time();
|
||||||
fading_pos = playback->get_fading_pos();
|
fading_pos = playback->get_fading_pos();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,11 +334,11 @@ float AnimationNodeStateMachinePlayback::get_current_length() const {
|
|||||||
return current_nti.length;
|
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;
|
return fadeing_from_nti.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
float AnimationNodeStateMachinePlayback::get_fade_from_length() const {
|
float AnimationNodeStateMachinePlayback::get_fading_from_length() const {
|
||||||
return fadeing_from_nti.length;
|
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_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_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_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);
|
ClassDB::bind_method(D_METHOD("get_travel_path"), &AnimationNodeStateMachinePlayback::_get_travel_path);
|
||||||
|
|
||||||
ADD_SIGNAL(MethodInfo(SceneStringName(state_started), PropertyInfo(Variant::STRING_NAME, "state")));
|
ADD_SIGNAL(MethodInfo(SceneStringName(state_started), PropertyInfo(Variant::STRING_NAME, "state")));
|
||||||
|
|||||||
@@ -340,8 +340,8 @@ public:
|
|||||||
float get_current_play_pos() const;
|
float get_current_play_pos() const;
|
||||||
float get_current_length() const;
|
float get_current_length() const;
|
||||||
|
|
||||||
float get_fade_from_play_pos() const;
|
float get_fading_from_play_pos() const;
|
||||||
float get_fade_from_length() const;
|
float get_fading_from_length() const;
|
||||||
|
|
||||||
float get_fading_time() const;
|
float get_fading_time() const;
|
||||||
float get_fading_pos() const;
|
float get_fading_pos() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user