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

Merge pull request #94783 from TokageItLab/validate-gltf-anim-name

Add validation to glTF importer for Blendshape and Animation
This commit is contained in:
Rémi Verschelde
2024-09-12 09:25:10 +02:00
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) {