-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose the current animation tree and player to AnimationNode
Exposes the `tree` and `player` members of `AnimationNode::State` available in C++ to scripts, enabling their use in custom nodes. Without this various obtuse and potentially problematic workarounds are required. For example, with this patch, the following code can be changed from this (which has undesired side effects): ```gdscript # seek the animation to its beginning, which will cause `blend_node` to # return its length duration = blend_node(animation_node_name, animation_node, 0.0, true, false, 0.0, AnimationNode.FILTER_IGNORE, true) ``` To the more obvious and direct form: ```gdscript duration = get_player().get_animation(animation_name).length ```
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters