Deprecate get_scene() in EditorScript class#109331
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 14, 2025
Merged
Deprecate get_scene() in EditorScript class#109331Repiteo merged 1 commit intogodotengine:masterfrom
get_scene() in EditorScript class#109331Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
32bb800 to
f200141
Compare
KoBeWi
approved these changes
Oct 22, 2025
Member
|
I think this makes sense given #109049 was merged. |
Mickeon
reviewed
Oct 22, 2025
Member
Mickeon
left a comment
There was a problem hiding this comment.
Hey, shouldn't the underlying method be surrounded by #ifndef DISABLE_DEPRECATED?
Member
|
It should. |
f200141 to
bc6fc73
Compare
KoBeWi
reviewed
Oct 22, 2025
editor/script/editor_script.cpp
Outdated
Comment on lines
88
to
92
| ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node); | ||
| #ifndef DISABLE_DEPRECATED | ||
| ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene); | ||
| #endif // DISABLE_DEPRECATED | ||
| ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorScript::get_editor_interface); |
Member
There was a problem hiding this comment.
Actually all these methods are deprecated 🤔
Member
There was a problem hiding this comment.
You could take it from here after this PR is merged.
Contributor
Author
There was a problem hiding this comment.
Good point.
Rebased, and fixed.
I also added WARN_DEPRECATED_MSG("EditorInterface is a global singleton and can be accessed directly by its name."); to the get_editor_interface() method to that it is consistent with the other ones.
bc6fc73 to
292772a
Compare
Contributor
|
Thanks! |
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.
Related: #109049
This method should be marked as deprecated with the editor warning to properly guide users to use the correct method in the
EditorInterfaceclass. This PR finalizes the deprecations of all methods in theEditorScriptclass that already have equivalent outside functionality.This will help track methods that should be removed during the next major update.