-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Remove ResourceImporterScene singletons in favor of local usage #107855
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
Merged
akien-mga
merged 1 commit into
godotengine:master
from
aaronfranke:scene-import-no-singleton
Nov 1, 2025
Merged
Remove ResourceImporterScene singletons in favor of local usage #107855
akien-mga
merged 1 commit into
godotengine:master
from
aaronfranke:scene-import-no-singleton
Nov 1, 2025
Conversation
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
2feea3d to
c497583
Compare
KoBeWi
reviewed
Aug 23, 2025
KoBeWi
reviewed
Aug 23, 2025
9620d19 to
e7e0279
Compare
KoBeWi
approved these changes
Aug 23, 2025
Member
KoBeWi
left a comment
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.
The code looks fine.
I'm not that familiar with scene import, so I didn't test it.
e7e0279 to
aef3379
Compare
aef3379 to
da2c9de
Compare
AThousandShips
approved these changes
Sep 25, 2025
da2c9de to
e7d6524
Compare
e7d6524 to
231addf
Compare
Repiteo
reviewed
Oct 31, 2025
4f86754 to
6c516a2
Compare
Member
|
Thanks! |
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 PR continues the work that #87787 started.
In the current master,
ResourceImporterScenehas two singletons registered, one for importing as Scene and one for importing as AnimationLibrary. These were created byEditorNode, which used a boolean to indicate that these should become singletons. The singletons were only ever used in one place, bySceneImportSettingsDialog, which had a lot of code duplication for choosing between the singletons. The only other usage ofResourceImporterSceneis in the tests.The existing code is quite a mess of spaghetti, and makes it harder for us to add non-scene-or-animation import types. Luckily, the fix is fairly straightforward: Get rid of the singletons, and make
SceneImportSettingsDialoginstead work with its own local copy ofResourceImporterScene, configuring it as needed. This was always the goal before I opened #87787, I just didn't prioritize this before now.