diff options
author | Eoin O'Neill <eoinoneill1991@gmail.com> | 2020-09-18 19:59:25 -0700 |
---|---|---|
committer | Eoin O'Neill <eoinoneill1991@gmail.com> | 2021-01-01 22:39:46 -0800 |
commit | 674fb52f52f6592c71de319fb4e3fa52be6c136c (patch) | |
tree | f6ec0715b0a0068d753079851d66c895595efb37 /scene/animation/animation_node_state_machine.cpp | |
parent | 36c943260ed40c6e31a6ecff7f6e1674714b4fcb (diff) |
StateMachinePlayback: Added missing bindings to `get_current_play_pos` and `get_current_length`.
This allows the user to query the AnimationNodeStateMachinePlayback's current
play position and total length of current animation state. These methods are currently
used in the editor plugin, but can also be useful for querying general playback state
information.
Added documentation for AnimationNodeStateMachinePlayback's `get_current_play_position`
Diffstat (limited to 'scene/animation/animation_node_state_machine.cpp')
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 36552c966d..f69a9381e1 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -495,6 +495,8 @@ void AnimationNodeStateMachinePlayback::_bind_methods() { ClassDB::bind_method(D_METHOD("stop"), &AnimationNodeStateMachinePlayback::stop); ClassDB::bind_method(D_METHOD("is_playing"), &AnimationNodeStateMachinePlayback::is_playing); ClassDB::bind_method(D_METHOD("get_current_node"), &AnimationNodeStateMachinePlayback::get_current_node); + 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_travel_path"), &AnimationNodeStateMachinePlayback::get_travel_path); } |