From 335d98afcde78521608a4bb292e500e2225ea5c2 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 25 Jul 2022 19:05:27 +0200 Subject: [PATCH] Ported: Add missing newlines to the generated default_env.tres in new projects. This prevents unnecessary whitespace changes in VCS diffs when saving a scene for the first time in a new project. - Calinou https://github.com/godotengine/godot/commit/053b54b67c9c44c1b8cd4476e97b1b397df9eb60 --- editor/project_manager.cpp | 52 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index a2e798571..c32a2356b 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -30,50 +30,39 @@ #include "project_manager.h" -#include "core/io/config_file.h" -#include "core/io/resource_saver.h" -#include "core/io/stream_peer_ssl.h" -#include "core/io/zip_io.h" -#include "core/os/dir_access.h" -#include "core/os/file_access.h" -#include "core/os/keyboard.h" -#include "core/os/os.h" -#include "core/project_settings.h" -#include "core/translation.h" -#include "core/version.h" -#include "editor_scale.h" -#include "editor_settings.h" -#include "editor_themes.h" -#include "scene/gui/label.h" -#include "scene/gui/line_edit.h" -#include "scene/gui/option_button.h" -#include "scene/gui/panel.h" -#include "scene/gui/panel_container.h" -#include "scene/gui/separator.h" -#include "scene/gui/texture_button.h" -#include "scene/gui/texture_rect.h" -#include "servers/navigation_server.h" -#include "servers/physics_2d_server.h" -#include "servers/physics_server.h" #include "core/class_db.h" #include "core/color.h" #include "core/engine.h" #include "core/error_list.h" #include "core/error_macros.h" #include "core/image.h" +#include "core/io/config_file.h" +#include "core/io/resource_saver.h" +#include "core/io/stream_peer_ssl.h" +#include "core/io/zip_io.h" #include "core/math/rect2.h" #include "core/math/vector2.h" +#include "core/os/dir_access.h" +#include "core/os/file_access.h" #include "core/os/input_event.h" +#include "core/os/keyboard.h" #include "core/os/main_loop.h" #include "core/os/memory.h" +#include "core/os/os.h" #include "core/pool_vector.h" #include "core/print_string.h" +#include "core/project_settings.h" #include "core/set.h" #include "core/sort_array.h" +#include "core/translation.h" #include "core/typedefs.h" #include "core/vector.h" +#include "core/version.h" #include "core/version_generated.gen.h" #include "editor/editor_about.h" +#include "editor_scale.h" +#include "editor_settings.h" +#include "editor_themes.h" #include "scene/2d/canvas_item.h" #include "scene/gui/base_button.h" #include "scene/gui/button.h" @@ -81,12 +70,23 @@ #include "scene/gui/container.h" #include "scene/gui/dialogs.h" #include "scene/gui/file_dialog.h" +#include "scene/gui/label.h" +#include "scene/gui/line_edit.h" #include "scene/gui/link_button.h" +#include "scene/gui/option_button.h" +#include "scene/gui/panel.h" +#include "scene/gui/panel_container.h" #include "scene/gui/scroll_container.h" +#include "scene/gui/separator.h" #include "scene/gui/tab_container.h" +#include "scene/gui/texture_button.h" +#include "scene/gui/texture_rect.h" #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/resources/texture.h" +#include "servers/navigation_server.h" +#include "servers/physics_2d_server.h" +#include "servers/physics_server.h" #include "thirdparty/minizip/ioapi.h" #include "thirdparty/minizip/unzip.h" @@ -514,7 +514,9 @@ private: set_message(TTR("Couldn't create project.pandemonium in project path."), MESSAGE_ERROR); } else { f->store_line("[gd_resource type=\"Environment\" load_steps=2 format=2]"); + f->store_line(""); f->store_line("[sub_resource type=\"ProceduralSky\" id=1]"); + f->store_line(""); f->store_line("[resource]"); f->store_line("background_mode = 2"); f->store_line("background_sky = SubResource( 1 )");