-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add AnimationNode lifecycle callbacks #41771
base: master
Are you sure you want to change the base?
Add AnimationNode lifecycle callbacks #41771
Conversation
Can you provide a small demo? I'm very interested in this. Edited: I noticed you had some problems with the static checks. Can walk you through the process. |
I'm throwing a demo project together now, hopefully will have it ready in a few hours. Appreciate the support--I'm not sure what to make of the static check output, since it's showing me a diff on a whitespace. |
misc\scripts\clang_format.sh can help. |
I threw together a rough demo project with a simple character. WASD to move, space to jump, left click to attack: https://github.com/RolandMQuiros/animation-node-lifecycle-demo I was having a rough time working through some UI bugs in 4.0, so I had to backport my changes to 3.2. You'll have to build Godot from this branch to run the demo: https://github.com/RolandMQuiros/godot/tree/animation-node-processing-3.2 If you look at the AnimationTree in the FSMCharacter scene, and click on one of the states, you'll see it has an By organizing my code this way, I can write smaller and more reusable scripts that execute only when their attached AnimationNode is processing. For example, the Punch state doesn't have a Let me know if you have any issues getting the demo to run. |
51a7ccc
to
328adce
Compare
Messed up a pull, sorry for the notifications. I didn't mean to add every dev as a reviewer, and I'm not sure how to undo that. |
I didn't have any time to review this. Try asking people in the discord. Edited: Asked jfons |
c8f5c93
to
aaeb0ba
Compare
To be ready for merging, the commits have to be either merged or there is a good reason to separate them for logical consistency. Edited: See https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html |
Also exposed child AnimationNodes as `child_nodes` property
aaeb0ba
to
a32539b
Compare
This is probably a solution to #28311 I would love to see this merged! |
The callback should be implemented as a signal, it is Godot's design concept. Also, it would be redundant to watch every |
Adds lifecycle script callbacks to
AnimationNode
so users can attach logic directly to animations.Feature proposal: Fixes godotengine/godot-proposals#1462 (comment)