1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Relaxes Node naming constraints in glTF documents to match the Editor.

This commit is contained in:
abaire
2021-01-28 12:48:12 -08:00
committed by Erik Abair
parent e5bb89cdd5
commit 61cc1c8624
12 changed files with 99 additions and 34 deletions

View File

@@ -767,9 +767,11 @@ void SceneTreeEditor::_renamed() {
return;
}
String new_name = which->get_text(0);
if (!Node::_validate_node_name(new_name)) {
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + Node::invalid_character);
String raw_new_name = which->get_text(0);
String new_name = raw_new_name.validate_node_name();
if (new_name != raw_new_name) {
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + String::invalid_node_name_characters);
error->popup_centered();
if (new_name.is_empty()) {