Skip to content

Validate name in add_blend_point and forbid duplicates#119066

Open
Ryan-000 wants to merge 1 commit into
godotengine:masterfrom
Ryan-000:fix-animation-6
Open

Validate name in add_blend_point and forbid duplicates#119066
Ryan-000 wants to merge 1 commit into
godotengine:masterfrom
Ryan-000:fix-animation-6

Conversation

@Ryan-000
Copy link
Copy Markdown
Contributor

Split from #119029

Name validation is already done in set_blend_point_name so it should be done in add_blend_point as well.

Also having duplicate names will cause issues, so I've added a check for that as well.

Name validation is already done in `set_blend_point_name` so it should be done in `add_blend_point` as well.
@Ryan-000 Ryan-000 requested a review from a team as a code owner April 28, 2026 20:47
#else
ERR_FAIL_COND(p_name == StringName());
#endif
ERR_FAIL_COND(p_name.is_empty() || String(p_name).contains_char('.') || String(p_name).contains_char('/'));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should make is_valid_animation_node_name() helpers, you can refere is_valid_animation_name().

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.

2 participants