Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new scene import option to import as Skeleton #88819

Merged

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Feb 25, 2024

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.

Examples:
Before:
Skeleton bones example before, showing nodes
After:
skeleton bones example after, showing a single Skeleton3D

Fixes #81935
Fixes #62275 (if not already fixed by ufbx)
May mitigate problems such as #78028, though this is really an export bug
I suspect there are more issues

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description looks sound

doc/classes/ResourceImporterScene.xml Outdated Show resolved Hide resolved
@AThousandShips AThousandShips added this to the 4.x milestone Feb 25, 2024
@fire fire requested a review from a team February 25, 2024 18:16
@@ -667,6 +678,10 @@ void SceneImportSettingsDialog::open_settings(const String &p_path, bool p_for_a
first_aabb = false;
}

const HashMap<StringName, Variant> &main_settings = scene_import_settings_data->current;
if (main_settings.find("nodes/import_as_skeleton_bones")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (main_settings.find("nodes/import_as_skeleton_bones")) {
if (main_settings.has("nodes/import_as_skeleton_bones")) {

editor/import/3d/scene_import_settings.cpp Outdated Show resolved Hide resolved
editor/import/3d/scene_import_settings.cpp Outdated Show resolved Hide resolved
@Illauriel
Copy link
Contributor

I love this so much! At some point I've spent countless hours trying to import an "empty nodes" animation from an FBX. Blender wasn't much help either, even with a "Better FBX" plugin. I think having this in core will save many users from a lot of headache.

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.
@lyuma lyuma force-pushed the import_nodes_as_skeleton_bones branch from 97cfdf1 to 652ef96 Compare February 26, 2024 11:06
@akien-mga akien-mga merged commit 3780604 into godotengine:master Feb 27, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants