From b7b40aeff41624fd2ff9cb4e0eb3e1f9302c6c94 Mon Sep 17 00:00:00 2001 From: vaner-org <9658355+vaner-org@users.noreply.github.com> Date: Tue, 17 Mar 2026 07:41:26 +0530 Subject: [PATCH] Fix invalid character when adding library anim in BlendSpace --- editor/animation/animation_blend_space_1d_editor.cpp | 2 +- editor/animation/animation_blend_space_2d_editor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/animation/animation_blend_space_1d_editor.cpp b/editor/animation/animation_blend_space_1d_editor.cpp index 42572c1ebb..95998e893e 100644 --- a/editor/animation/animation_blend_space_1d_editor.cpp +++ b/editor/animation/animation_blend_space_1d_editor.cpp @@ -537,7 +537,7 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) { updating = true; EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); undo_redo->create_action(TTR("Add Animation Point")); - undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos, -1, _get_safe_name(blend_space, animations_to_add[p_index])); + undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos, -1, _get_safe_name(blend_space, String(animations_to_add[p_index]).validate_node_name())); undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count()); undo_redo->add_do_method(this, "_update_space"); undo_redo->add_undo_method(this, "_update_space"); diff --git a/editor/animation/animation_blend_space_2d_editor.cpp b/editor/animation/animation_blend_space_2d_editor.cpp index 4e0a2af2b8..2310d93caf 100644 --- a/editor/animation/animation_blend_space_2d_editor.cpp +++ b/editor/animation/animation_blend_space_2d_editor.cpp @@ -452,7 +452,7 @@ void AnimationNodeBlendSpace2DEditor::_add_animation_type(int p_index) { updating = true; EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); undo_redo->create_action(TTR("Add Animation Point")); - undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos, -1, _get_safe_name(blend_space, animations_to_add[p_index])); + undo_redo->add_do_method(blend_space.ptr(), "add_blend_point", anim, add_point_pos, -1, _get_safe_name(blend_space, String(animations_to_add[p_index]).validate_node_name())); undo_redo->add_undo_method(blend_space.ptr(), "remove_blend_point", blend_space->get_blend_point_count()); undo_redo->add_do_method(this, "_update_space"); undo_redo->add_undo_method(this, "_update_space");