From cd6e5ba9f48801d7c2c6708a7cec0ff200d2118a Mon Sep 17 00:00:00 2001 From: daniel080400 Date: Thu, 19 Jun 2025 01:31:15 +0800 Subject: [PATCH] Do not remove subviewport nodes in thumbnail preview scene --- editor/plugins/editor_preview_plugins.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index f203c6b21de..cf958cbec01 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -583,13 +583,6 @@ Ref EditorPackedScenePreviewPlugin::generate_from_path(const String & } void EditorPackedScenePreviewPlugin::_setup_scene_3d(Node *p_node) const { - // Do not account any SubViewport at preview scene, as it would not render correctly - if (Object::cast_to(p_node) && p_node->get_parent()) { - p_node->get_parent()->remove_child(p_node); - callable_mp(p_node, &Node::queue_free).call_deferred(); - return; - } - // Don't let window to popup Window *window = Object::cast_to(p_node); if (window) { @@ -639,13 +632,6 @@ void EditorPackedScenePreviewPlugin::_setup_scene_3d(Node *p_node) const { } void EditorPackedScenePreviewPlugin::_setup_scene_2d(Node *p_node) const { - // Do not account any SubViewport at preview scene, as it would not render correctly - if (Object::cast_to(p_node) && p_node->get_parent()) { - p_node->get_parent()->remove_child(p_node); - callable_mp(p_node, &Node::queue_free).call_deferred(); - return; - } - // Don't let window to popup Window *window = Object::cast_to(p_node); if (window) {