-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Expose save_all_scenes
method to EditorInterface
#77537
Expose save_all_scenes
method to EditorInterface
#77537
Conversation
1d9b680
to
ee0bd61
Compare
You need to fix the documentation. You've probably edited it manually, but the order is incorrect. Make sure to use the doctool instead of editing by hand, and then fill out the description. See this doc. I agree that the names of the existing methods give a wrong impression, but we don't consider such breaking changes anymore, since Godot 4 is stable. That said, I think your problem can be solved if we were to expose a proper |
ee0bd61
to
09d8a42
Compare
Done! |
09d8a42
to
76c5c12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks for submitting it! It looks like some people in the repository put the "(squash)" notice at the end of the squashed commit titles though I'm admittedly not sure how rigid we are about this as a commit formatting standard.
That would be incorrect. |
Ok thanks for the clarification! |
This is caused by using |
@AThousandShips Both actions are squashing commits. It's just one appends the commit message from the squashed commit, and the other drops it. But let's not derail this PR review too much, OP is completely fine here :) But it will have to wait a bit for the 4.2 merge window. |
Update documentation (squash) fix docs (squash) Improve docs
76c5c12
to
8ef2e3d
Compare
Thanks for the rebase :) I'm adding this PR to the queue so we don't forget about it. |
save_all_scenes
method to Editor Interfacesave_all_scenes
method to EditorInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Important note that this will stop the currently playing scene.
Thanks! |
This PR exposes
save_all_scenes
method to theEditorInterface
class. It's a very simple change, but I don't think there were other ways to do this in the editor.I added the documentation for this method and changed, but I wanted to propose changing
save_scene
tosave_edited_scene
(andsave_scene_as
tosave_edited_scene_as
). It's a breaking change, but the previous method names gives the wrong impression on what they do, since it's not possible to use them to save an arbitrary editor scene. Is it okay to add this on this PR, or should I ignore this?PS: My use-case is a very simple addon with pre-configured resolutions for different mobile devices. I need to change the resolution in the inspector quickly, without the hassle of opening Project Settings multiple times, and I need the addon to reload every open scene to see the changes. Problem is, when the scenes reload, any modification not saved is lost, so I need to save them first. Before this PR, I was saving all scenes by running
play
andstop
via code, because by default the editor saves all scenes before playing the game - but that certainly wasn't efficient nor the best way to do this.