I've pulled form git my game, opened it in Godot 2.1 editor, and then I saw in my shell that files have changed! But I've not even saved anything!
here's git diff:
diff --git a/main.tscn b/main.tscn
index abc0021..31c1cd7 100644
--- a/main.tscn
+++ b/main.tscn
@@ -273,3 +273,5 @@ geometry/depth_scale = false
geometry/visible_in_all_rooms = false
geometry/use_baked_light = false
geometry/baked_light_tex_id = 0
+
+
To reproduce:
What's worse, Godot now removed my comments from .tscn file without my consent and without me saving anything!
diff --git a/main.tscn b/main.tscn
index ef187b7..31c1cd7 100644
--- a/main.tscn
+++ b/main.tscn
@@ -1,21 +1,3 @@
-;Copyright (c) 2016 Hubert Jarosz
-;
-;This software is provided 'as-is', without any express or implied
-;warranty. In no event will the authors be held liable for any damages
-;arising from the use of this software.
-;
-;Permission is granted to anyone to use this software for any purpose,
-;including commercial applications, and to alter it and redistribute it
-;freely, subject to the following restrictions:
-;
-;1. The origin of this software must not be misrepresented; you must not
-; claim that you wrote the original software. If you use this software
-; in a product, an acknowledgement in the product documentation would be
-; appreciated but is not required.
-;2. Altered source versions must be plainly marked as such, and must not be
-; misrepresented as being the original software.
-;3. This notice may not be removed or altered from any source distribution.
-
[gd_scene load_steps=7 format=1]
[ext_resource path="res://boxie.gd" type="Script" id=1]
@@ -291,3 +273,5 @@ geometry/depth_scale = false
geometry/visible_in_all_rooms = false
geometry/use_baked_light = false
geometry/baked_light_tex_id = 0
+
+
For the added whitespace, they're likely hardcoded, but that could probably be fixed.
Apparently comments are not supported; this could be improved too I guess.
As for the main issue which is that the .tscn file gets automatically saved on load, it's maybe not necessary. @reduz would likely know better if it's done for a precise reason or not.
I never made it auto save on load, maybe some PR we merged recently is
doing this for some reason.
On Wed, Aug 3, 2016 at 2:51 PM, Rémi Verschelde [email protected]
wrote:
For the added whitespace, they're likely hardcoded, but that could
probably be fixed.Apparently comments are not supported; this could be improved too I guess.
As for the main issue which is that the .tscn file gets automatically
saved on load, it's maybe not necessary. @reduz https://github.com/reduz
would likely know better if it's done for a precise reason or not.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/6025#issuecomment-237308253,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2_x5AL30sNCjssp7Yjoc8az25ryGks5qcNUtgaJpZM4Jb47E
.
Ah, Godot will always save before runing a scene. We never made it not save
if changes were not done I guess. At this point I suppose we could do it.
On Wed, Aug 3, 2016 at 2:57 PM, Juan Linietsky [email protected] wrote:
I never made it auto save on load, maybe some PR we merged recently is
doing this for some reason.On Wed, Aug 3, 2016 at 2:51 PM, Rémi Verschelde [email protected]
wrote:For the added whitespace, they're likely hardcoded, but that could
probably be fixed.Apparently comments are not supported; this could be improved too I guess.
As for the main issue which is that the .tscn file gets automatically
saved on load, it's maybe not necessary. @reduz
https://github.com/reduz would likely know better if it's done for a
precise reason or not.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/6025#issuecomment-237308253,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2_x5AL30sNCjssp7Yjoc8az25ryGks5qcNUtgaJpZM4Jb47E
.
Ability to add a copyright notice to xml/tscn files would actually be awesome. A perfect place is project settings.
Comments are now supported and kept. For the empty lines added at the end of the file, that's because you modified the file with an external text editor which trimmed trailing lines, while Godot likely adds \n\n when saving a tscn file by default. This could likely be fixed by removing this extraneous \n\n.
So both symptoms of this issue are either fixed or easy to fix, but I agree that it would be good to make Godot avoid saving the scene before running it if no changes were made. Tagging as junior job.
Reopening as #17589 was reverted by #19836 as it caused regressions.
@Marqin Can you (or anyone else) still reproduce this bug in Godot 3.2.3 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
Most helpful comment
Ability to add a copyright notice to xml/tscn files would actually be awesome. A perfect place is project settings.