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

This commit is contained in:
abaire 2021-01-28 11:43:49 -08:00 committed by Erik Abair
parent db246f8edb
commit b032067e42
9 changed files with 72 additions and 35 deletions

View file

@ -4111,6 +4111,18 @@ String String::property_name_encode() const {
return *this;
}
// Changes made to the set of invalid characters must also be reflected in the String documentation.
const String String::invalid_node_name_characters = ". : @ / \"";
String String::validate_node_name() const {
Vector<String> chars = String::invalid_node_name_characters.split(" ");
String name = this->replace(chars[0], "");
for (int i = 1; i < chars.size(); i++) {
name = name.replace(chars[i], "");
}
return name;
}
String String::get_basename() const {
int pos = find_last(".");