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

Don't expose AnimationNodeStartState and AnimationNodeEndState as internal, this triggers a ClassDB bug #102433

Conversation

akien-mga
Copy link
Member

Fixes #99534.

Please test to confirm the functionality still works, I don't know how to use of it.

Comment on lines 1325 to 1326
return !(states[p_name].node->is_class("AnimationNodeStartState") || states[p_name].node->is_class("AnimationNodeEndState"));
const Ref<AnimationNode> &anode = states[p_name].node;
return !(Ref<AnimationNodeStartState>(anode).is_valid() || Ref<AnimationNodeEndState>(anode).is_valid());
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that I didn't actually check whether this needed to change to work. But in general relying on casting pointers seems better than a string check through ClassDB.

@akien-mga akien-mga force-pushed the unexpose-AnimationNodeStartState-EndState branch from 4a30bf0 to ede3d21 Compare February 4, 2025 21:20
@fire
Copy link
Member

fire commented Feb 4, 2025

@TokageItLab Can you take a look?

Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

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

Tested and confirmed that delete and other operations are prevented correctly for them.

@akien-mga akien-mga merged commit c4e15e2 into godotengine:master Feb 10, 2025
19 checks passed
@akien-mga akien-mga deleted the unexpose-AnimationNodeStartState-EndState branch February 10, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
4 participants