You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Merge pull request #107676 from daniel080400/fix_issue_107667
Do not remove ```SubViewport``` nodes in thumbnail preview scene
This commit is contained in:
@@ -583,13 +583,6 @@ Ref<Texture2D> 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<SubViewport>(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<Window>(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<SubViewport>(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<Window>(p_node);
|
||||
if (window) {
|
||||
|
||||
Reference in New Issue
Block a user