tools: Add script to load+save all scenes that use some resource - #2707
Merged
manuq merged 1 commit intoAug 13, 2026
Merged
Conversation
This is useful when making some change across all instances of a script/scene: 1. Add migration code to the script that runs when the node is instantiated 2. Run this script 3. Remove the migration code 4. Commit the result As commented here you can do this by running a built-in tool that does this to *all* scenes but this can be much more disruptive. You can also do this in the editor by using View Owners..., selecting all, opening all the scenes, then saving each one. You can't use "save all scenes" unless you have marked each scene as unsaved; and EditorInterface.mark_scene_as_unsaved() only operates on the foreground tab (haven't actually checked what happens if you bulk-open scenes and call this during the loading of each one); so doing this by hand involves hitting Ctrl+S, Ctrl+Shift+W, repeatedly.
|
Play this branch at https://play.threadbare.game/branches/endlessm/wjt/tools-add-script-to-load-save-all-scenes-that-use-some-resource/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
manuq
deleted the
wjt/tools-add-script-to-load-save-all-scenes-that-use-some-resource
branch
August 13, 2026 20:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is useful when making some change across all instances of a
script/scene:
instantiated
As commented here you can do this by running a built-in tool that does
this to all scenes but this can be much more disruptive.
You can also do this in the editor by using View Owners..., selecting
all, opening all the scenes, then saving each one. You can't use "save
all scenes" unless you have marked each scene as unsaved; and
EditorInterface.mark_scene_as_unsaved()only operates on the foregroundtab (haven't actually checked what happens if you bulk-open scenes and
call this during the loading of each one); so doing this by hand
involves hitting Ctrl+S, Ctrl+Shift+W, repeatedly.