Skip to content

Commit 782a026

Browse files
committed
Merge pull request godotengine#92196 from lyuma/gltf_anim_library_import_as_bones
Support Import As Skeleton Bones on glTF and AnimationLibrary import
2 parents da979ec + ef486db commit 782a026

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

editor/import/3d/resource_importer_scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ bool ResourceImporterScene::get_option_visibility(const String &p_path, const St
279279
}
280280
}
281281

282-
if (animation_importer && (p_option.begins_with("nodes/") || p_option.begins_with("meshes/") || p_option.begins_with("skins/"))) {
282+
if (animation_importer && (p_option == "nodes/root_type" || p_option == "nodes/root_name" || p_option.begins_with("meshes/") || p_option.begins_with("skins/"))) {
283283
return false; // Nothing to do here for animations.
284284
}
285285

modules/gltf/editor/editor_scene_importer_gltf.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t
5959
int32_t enum_option = p_options["gltf/embedded_image_handling"];
6060
state->set_handle_binary_image(enum_option);
6161
}
62+
if (p_options.has(SNAME("nodes/import_as_skeleton_bones")) ? (bool)p_options[SNAME("nodes/import_as_skeleton_bones")] : false) {
63+
state->set_import_as_skeleton_bones(true);
64+
}
6265
Error err = gltf->append_from_file(p_path, state, p_flags);
6366
if (err != OK) {
6467
if (r_err) {

0 commit comments

Comments
 (0)