1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add new scene import option to import as Skeleton

Adds a bool import option `nodes/import_as_skeleton_bones`.
This is supported in all FBX or GLTF document based formats.
It is especially useful for retargeting and importing animations.
This commit is contained in:
Lyuma
2024-02-25 00:36:39 -08:00
parent 2e7fc81315
commit 652ef966f9
14 changed files with 69 additions and 4 deletions

View File

@@ -2086,7 +2086,7 @@ Error FBXDocument::_parse_fbx_state(Ref<FBXState> p_state, const String &p_searc
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);
/* CREATE SKELETONS */