Merge pull request #88819 from lyuma/import_nodes_as_skeleton_bones

Add new scene import option to import as Skeleton
This commit is contained in:
Rémi Verschelde
2024-02-27 10:18:00 +01:00
14 changed files with 69 additions and 4 deletions

View File

@@ -6937,7 +6937,7 @@ Error GLTFDocument::_parse_gltf_state(Ref<GLTFState> p_state, const String &p_se
ERR_FAIL_COND_V(err != OK, ERR_PARSE_ERROR);
/* DETERMINE SKELETONS */
err = SkinTool::_determine_skeletons(p_state->skins, p_state->nodes, p_state->skeletons);
err = SkinTool::_determine_skeletons(p_state->skins, p_state->nodes, p_state->skeletons, p_state->get_import_as_skeleton_bones() ? p_state->root_nodes : Vector<GLTFNodeIndex>());
ERR_FAIL_COND_V(err != OK, ERR_PARSE_ERROR);
/* PARSE MESHES (we have enough info now) */