Skip to content

Commit

Permalink
Merge pull request #93117 from jsjtxietian/gltf-owner
Browse files Browse the repository at this point in the history
Unset the owner of `ImporterMeshInstance3D` before adding it to skeleton's child
  • Loading branch information
akien-mga committed Jun 13, 2024
2 parents 2fab2c7 + e094435 commit fc499fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fc499fc

Please sign in to comment.