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
Eoin-ONeill-Yokai
left a comment
There was a problem hiding this comment.
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
YuriSizov
left a comment
There was a problem hiding this comment.
LGTM. Important note that this will stop the currently playing scene.
|
Thanks! |
…ave_all_scenes Expose `save_all_scenes` method to EditorInterface
…ave_all_scenes Expose `save_all_scenes` method to EditorInterface
This PR exposes
save_all_scenesmethod to theEditorInterfaceclass. 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_scenetosave_edited_scene(andsave_scene_astosave_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
playandstopvia 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.