summaryrefslogtreecommitdiffstats
path: root/modules/gltf
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2024-06-13 12:45:55 +0800
committerjsjtxietian <jsjtxietian@outlook.com>2024-06-13 12:45:55 +0800
commite09443509adaf182f678c40647877e3f1fd57ad5 (patch)
tree2c8252b027ad5218f930be1638af8ece3ca2dd7f /modules/gltf
parent5241d30bfa223ed45784e32d8143d20a98a8d862 (diff)
downloadredot-engine-e09443509adaf182f678c40647877e3f1fd57ad5.tar.gz
Unsetting the owner of `ImporterMeshInstance3D` before adding it to skeleton's child
Diffstat (limited to 'modules/gltf')
-rw-r--r--modules/gltf/gltf_document.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 42428231e6..32fe37d9af 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -6328,6 +6328,7 @@ void GLTFDocument::_process_mesh_instances(Ref<GLTFState> 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);