summaryrefslogtreecommitdiff
path: root/editor/plugins/animation_library_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-05 07:00:29 +0200
committerGitHub <noreply@github.com>2022-05-05 07:00:29 +0200
commit30f3c4255e506c25e3273906c01127f8614540bc (patch)
tree31c2a280cc82eecd60249bb0d1edd6a906647d03 /editor/plugins/animation_library_editor.cpp
parent0f8ee1d256c2bc7dc7bafc32e8137644bcc4a8ae (diff)
parentb3162e270e7b3e885330a61570f148b76f25950f (diff)
Merge pull request #60776 from timothyqiu/animlib-names
Fix global AnimationLibrary name validation
Diffstat (limited to 'editor/plugins/animation_library_editor.cpp')
-rw-r--r--editor/plugins/animation_library_editor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 581c3c05a5..b43a4215b1 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -55,7 +55,7 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) {
ERR_FAIL_COND(al.is_null());
if (p_name == "") {
error = TTR("Animation name can't be empty.");
- } else if (!AnimationLibrary::is_valid_name(p_name)) {
+ } else if (!AnimationLibrary::is_valid_animation_name(p_name)) {
error = TTR("Animation name contains invalid characters: '/', ':', ',' or '['.");
} else if (al->has_animation(p_name)) {
error = TTR("Animation with the same name already exists.");
@@ -63,7 +63,7 @@ void AnimationLibraryEditor::_add_library_validate(const String &p_name) {
} else {
if (p_name == "" && bool(player->call("has_animation_library", ""))) {
error = TTR("Enter a library name.");
- } else if (!AnimationLibrary::is_valid_name(p_name)) {
+ } else if (!AnimationLibrary::is_valid_library_name(p_name)) {
error = TTR("Library name contains invalid characters: '/', ':', ',' or '['.");
} else if (bool(player->call("has_animation_library", p_name))) {
error = TTR("Library with the same name already exists.");
@@ -256,7 +256,7 @@ void AnimationLibraryEditor::_load_file(String p_path) {
}
}
- String name = AnimationLibrary::validate_name(p_path.get_file().get_basename());
+ String name = AnimationLibrary::validate_library_name(p_path.get_file().get_basename());
int attempt = 1;