From e09443509adaf182f678c40647877e3f1fd57ad5 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Thu, 13 Jun 2024 12:45:55 +0800 Subject: [PATCH] Unsetting the owner of `ImporterMeshInstance3D` before adding it to skeleton's child --- modules/gltf/gltf_document.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 42428231e63..32fe37d9afc 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -6328,6 +6328,7 @@ void GLTFDocument::_process_mesh_instances(Ref p_state, Node *p_scene ERR_CONTINUE_MSG(skeleton == nullptr, vformat("Unable to find Skeleton for node %d skin %d", node_i, skin_i)); mi->get_parent()->remove_child(mi); + mi->set_owner(nullptr); skeleton->add_child(mi, true); mi->set_owner(p_scene_root);