Bugfix: Sanitize glTF importer Animation Names and do not set bone_pose

This commit is contained in:
Marios Staikopoulos 2019-11-27 12:19:08 -08:00
parent 1af9701caa
commit 4b28fd4f23

View file

@ -2143,7 +2143,6 @@ Error EditorSceneImporterGLTF::_create_skeletons(GLTFState &state) {
skeleton->add_bone(node->name);
skeleton->set_bone_rest(bone_index, node->xform);
skeleton->set_bone_pose(bone_index, node->xform);
if (node->parent >= 0 && state.nodes[node->parent]->skeleton == skel_i) {
const int bone_parent = skeleton->find_bone(state.nodes[node->parent]->name);
@ -2324,7 +2323,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
Array samplers = d["samplers"];
if (d.has("name")) {
animation.name = d["name"];
animation.name = _sanitize_scene_name(d["name"]);
}
for (int j = 0; j < channels.size(); j++) {