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

Add AnimationTree Advance Expressions #61196

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

fire
Copy link
Member

@fire fire commented May 19, 2022

Remake of Reduz's pull request.


This gives much greater flexibility for creating complex state machines. By directly interfacing with the script code, it is possible to create complex animation advance condition for switching between states.

Ensure assigning AnimationTreeStateMachineTransition base expression node in editor is relative to current AnimationTree node.

Allow setting an expression base node on the AnimationTree itself

Allows specifying an expression as a condition for state machine transitions.

Co-Authored-By: reduz reduzio@gmail.com


Part of the V-Sekai group. https://github.com/v-sekai

@fire
Copy link
Member Author

fire commented May 19, 2022

@neikeq This is erroring on mono and I can't figure out why.

@fire fire requested a review from a team May 19, 2022 18:08
@fire fire force-pushed the animtree-advance-expressions branch 2 times, most recently from ee44989 to 70ab9c6 Compare May 19, 2022 20:22
@fire
Copy link
Member Author

fire commented May 19, 2022

On master these constants were swapped.

<constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint">
</constant>
<constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint">
</constant>

@reduz
Copy link
Member

reduz commented Jun 23, 2022

At a glance it looks ok to me.

core/object/object.h Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

akien-mga commented Jun 23, 2022

This is probably a bit tricky at this stage with multiple co-authors not all familiar with all changes, but it would have been nice if the changes in this PR could have been two separate PRs or at least commits, one for the core/expression changes and one actually adding the AnimationTree advance expressions. This would make the code and history more readable and the review of the core and animation parts easier to do for respective teams.
Now it's probably a bit late so I'm not asking for this work to be done a posteriori, unless you're motivated :)

@fire fire force-pushed the animtree-advance-expressions branch from 5539303 to 2d78b4a Compare June 27, 2022 19:29
@SaracenOne SaracenOne force-pushed the animtree-advance-expressions branch from 2d78b4a to fea3d6b Compare June 27, 2022 19:32
@fire
Copy link
Member Author

fire commented Jun 27, 2022

Since this has been stuck. I'm motivated!

@fire
Copy link
Member Author

fire commented Jun 27, 2022

Pulled out Add a const call mode to Object, Variant and Script. #62468

Edited:

Resolved a few comments in the other pr.

The second part is at: https://github.com/V-Sekai/godot/tree/animtree-expressions-separated

@fire fire force-pushed the animtree-advance-expressions branch from fea3d6b to 4c030d4 Compare June 27, 2022 23:50
@fire
Copy link
Member Author

fire commented Jun 27, 2022

@TokageItLab Any last reviews?

@fire fire requested a review from reduz June 27, 2022 23:54
@TokageItLab
Copy link
Member

Sorry, I am not familiar with StateMachine, so I cannot review with confidence.
There is a problem with flickering when first frame in transitions, but I remember that was an issue unrelated to this PR.

Allows specifying an expression as a condition for state machine transitions.

This gives much greater flexibility for creating complex state machines. By directly interfacing with the script code, it is possible to create complex animation advance condition for switching between states.

Ensure assigning AnimationTreeStateMachineTransition base expression node in editor is relative to current AnimationTree node.

Allow setting an expression base node on the AnimationTree itself.

Co-Authored-By: reduz <reduzio@gmail.com>
@fire fire force-pushed the animtree-advance-expressions branch from 4c030d4 to 75a8606 Compare June 28, 2022 16:28
@akien-mga akien-mga merged commit fed5ebb into godotengine:master Jun 28, 2022
@akien-mga
Copy link
Member

Thanks!

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.

None yet

7 participants