Add validation to glTF importer for Blendshape and Animation

This commit is contained in:
Silc 'Tokage' Renew
2024-07-26 17:04:56 +09:00
parent f0e20efb33
commit 0235086c14
4 changed files with 15 additions and 15 deletions

View File

@ -288,14 +288,8 @@ String FBXDocument::_gen_unique_name(HashSet<String> &unique_names, const String
}
String FBXDocument::_sanitize_animation_name(const String &p_name) {
// Animations disallow the normal node invalid characters as well as "," and "["
// (See animation/animation_player.cpp::add_animation)
// TODO: Consider adding invalid_characters or a validate_animation_name to animation_player to mirror Node.
String anim_name = p_name.validate_node_name();
anim_name = anim_name.replace(",", "");
anim_name = anim_name.replace("[", "");
return anim_name;
return AnimationLibrary::validate_library_name(anim_name);
}
String FBXDocument::_gen_unique_animation_name(Ref<FBXState> p_state, const String &p_name) {