Преглед на файлове

Merge pull request #93117 from jsjtxietian/gltf-owner

Unset the owner of `ImporterMeshInstance3D` before adding it to skeleton's child
Rémi Verschelde преди 1 година
родител
ревизия
fc499fc703
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      modules/gltf/gltf_document.cpp

+ 1 - 0
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);