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

Fix crash when importing a GLTF file with a skeleton as the root #87933

Merged

Conversation

aaronfranke
Copy link
Member

This is an edge case, but I ran into a situation where the root node of an imported GLTF scene was trying to be generated as a skeleton. This is crashing in the current master. This PR fixes it, now the skeleton will check if there is no root node and if so it will make itself the root node.

Note: The GLTFDocument::_process_mesh_instances function used to have a Node *p_scene_root parameter, but it was not used before. In #80272 I removed it. This was not quite the right fix, it should've been used, not removed.

@aaronfranke aaronfranke added this to the 4.3 milestone Feb 4, 2024
@aaronfranke aaronfranke requested a review from a team as a code owner February 4, 2024 08:56
@aaronfranke aaronfranke added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Feb 4, 2024
@akien-mga akien-mga merged commit 3eb25dd into godotengine:master Feb 5, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the fix-gltf-crash-root-skel-imp branch February 5, 2024 15:01
@akien-mga
Copy link
Member

Cherry-picked for 4.2.2.

@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants