Skip to content

Commit

Permalink
Merge pull request #33953 from marstaik/gltf_bugfix
Browse files Browse the repository at this point in the history
Bugfix: Sanitize glTF importer Animation Names and do not set bone_pose
  • Loading branch information
akien-mga authored Nov 27, 2019
2 parents 9e3fb2b + 4b28fd4 commit a87a871
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions editor/import/editor_scene_importer_gltf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit a87a871

Please sign in to comment.