Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimationStateMachinePlayback: Added Missing Method Bindings #42188

Conversation

Eoin-ONeill-Yokai
Copy link
Contributor

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 state. These methods are currently used in the C++ editor plugin, but can also be useful for querying general playback state information for gameplay purposes. It can also be useful for driving state machine playback via script.

Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful. It would be nice to update the documentation with the two new methods here:
https://github.com/godotengine/godot/blob/master/doc/classes/AnimationNodeStateMachinePlayback.xml

@pouleyKetchoupp pouleyKetchoupp added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 19, 2020
@akien-mga
Copy link
Member

Indeed if we add methods to the public API, they need documentation.

@Eoin-ONeill-Yokai
Copy link
Contributor Author

@akien-mga Sure, just wanted to propose the changes first before writing documentation.

I'll take the time to do that this weekend.

@Eoin-ONeill-Yokai Eoin-ONeill-Yokai force-pushed the animationstateplayback/missing_binds branch from 8348af0 to 6045aa8 Compare January 1, 2021 07:36
@Eoin-ONeill-Yokai Eoin-ONeill-Yokai requested a review from a team as a code owner January 1, 2021 07:36
@Eoin-ONeill-Yokai Eoin-ONeill-Yokai requested review from akien-mga and removed request for a team January 1, 2021 07:37
@Eoin-ONeill-Yokai
Copy link
Contributor Author

@akien-mga Sorry for the delay, I've been rather busy.

I've added the documentation and corrected the method name in the bindings for GDScript. I've also rebased onto master.

@akien-mga
Copy link
Member

Could you squash the three commits into one? Then it should be good to merge.

…` 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`
@Eoin-ONeill-Yokai Eoin-ONeill-Yokai force-pushed the animationstateplayback/missing_binds branch from 6045aa8 to 674fb52 Compare January 2, 2021 06:40
@Eoin-ONeill-Yokai
Copy link
Contributor Author

@akien-mga It's all merged down to a single commit now. Thanks :)

@akien-mga akien-mga merged commit 7a16efc into godotengine:master Jan 2, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.2.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants