Skip to content

Commit

Permalink
Don't expose AnimationNodeStartState and AnimationNodeEndState as int…
Browse files Browse the repository at this point in the history
…ernal, this triggers a ClassDB bug

Fixes godotengine#99534.
  • Loading branch information
akien-mga committed Feb 4, 2025
1 parent 0b6a717 commit ede3d21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion scene/animation/animation_node_state_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,8 @@ bool AnimationNodeStateMachine::are_ends_reset() const {

bool AnimationNodeStateMachine::can_edit_node(const StringName &p_name) const {
if (states.has(p_name)) {
return !(states[p_name].node->is_class("AnimationNodeStartState") || states[p_name].node->is_class("AnimationNodeEndState"));
const AnimationNode *anode = states[p_name].node.ptr();
return !(Object::cast_to<AnimationNodeStartState>(anode) || Object::cast_to<AnimationNodeEndState>(anode));
}

return true;
Expand Down
3 changes: 0 additions & 3 deletions scene/register_scene_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,6 @@ void register_scene_types() {
GDREGISTER_CLASS(AnimationNodeStateMachinePlayback);
GDREGISTER_VIRTUAL_CLASS(AnimationNodeExtension);

GDREGISTER_INTERNAL_CLASS(AnimationNodeStartState);
GDREGISTER_INTERNAL_CLASS(AnimationNodeEndState);

GDREGISTER_CLASS(AnimationNodeSync);
GDREGISTER_CLASS(AnimationNodeStateMachineTransition);
GDREGISTER_CLASS(AnimationNodeOutput);
Expand Down

0 comments on commit ede3d21

Please sign in to comment.