-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Reimporting GLTF causes "Attempt to disconnect a nonexistent connection" in inherited scene, duplicate meshes and crash #87451
Comments
Experiencing same issue. Having the inherited scene open while doing the re-import on the original model is key to replicating the bug. Before finding this post, this bug caused hours of running in circles since the window is not showing accurate data. Also occurring to .blend files because of the behind-the-scenes GLTF importer. |
Experiencing the same issue with a custom importer. Even if we end the _import function early by just returning Error.Ok, or any other Error, the console error and duplicate "ghost" object still appears. Addendum: Forgot to mention that our _import function does run properly and things get reimported, so we don't encounter that issue specifically Some things we noticed:
A tldr of the above: if an inherited scene's original asset is reimported, while it is an open tab in the editor, the node itself gets added to the subviewport and appears in any open scene until you a) open the scene it originates from, or b) close the scene it originates from. None of this happens if the inherited scene is not open in the editor. during the import process. This seems to happen specifically with inherited scenes, as the original import scenes don't have this problem After checking some of the godot engine code, we found that the function on line 3546 (https://github.com/godotengine/godot/blob/master/editor/editor_node.cpp#L3546)
|
Experiencing the duplication issue and the error message. The re-import of the gltf assets goes through though. |
Lines 5754 to 5764 in b2f425f
Related to the above code. The previous code does a similar job to diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 4fb1a86ce2..81d08c8953 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5751,13 +5751,7 @@ void EditorNode::reload_instances_with_path_in_edited_scenes(const String &p_ins
instantiated_node->set_scene_inherited_state(state);
instantiated_node->set_scene_file_path(String());
}
- editor_data.set_edited_scene_root(instantiated_node);
current_edited_scene = instantiated_node;
-
- if (original_node->is_inside_tree()) {
- SceneTreeDock::get_singleton()->set_edited_scene(current_edited_scene);
- original_node->get_tree()->set_edited_scene_root(instantiated_node);
- }
}
// Replace the original node with the instantiated version. It might be better to have |
Tested versions
Tested in v4.2.1 (latest stable version)
System information
Godot v4.2.1 - Windows 10, Forward+/Vulkan GTX 1060 6GB
Issue description
Reimporting a gltf file (either by opening the .gltf in Godot and clicking "reimport" or by dragging the gltf and accompanying .bin file into godots ressource directory letting godot reimport it) causes a
Attempt to disconnect a nonexistent connection from 'test:<Node3D#1825814147267>'. Signal: 'replacing_by', callable: 'EditorNode::set_edited_scene'.
error to be printed in the output window. The asset also doesn't get reimported.
Also, if we create another scene and place the inherited scene in there and try to reimport the asset, it fails and creates a duplicate instance of the reimported asset at the center of the scene.
"level.tscn" which has "test.tscn" placed in the scene with a translation offset:
After reimporting the gltf:
Note also how the Scene view on the left side on the screen doesn't match what we actually see in the 3D preview. (it shows the nodes from the inherited scene)
This in turn can also cause Godot to crash shortly after. (somewhat random.)
I attached the reproduction sample/project as a zip.
Steps to reproduce
Minimal reproduction project (MRP)
ReimportTest.zip
The text was updated successfully, but these errors were encountered: