Use Core/Scene stringnames consistently #91909
Merged
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.
Follow-up to #81303
Replaces #50941
This PR solidifies usage of CoreStringNames and SceneStringNames by replacing every string instance by its singleton equivalent, if it already existed. I also removed some duplicate or unused names. I might have missed some very common names, as it's difficult to find them in all replaceable contexts.
Up to discussion, but I included core string names in
variant.h
and scene string names innode.h
andresource.h
. This makes them easily accessible without extra includes. These files are not modified often, so it's probably fine to do that. I removed all other includes of these files. I didn't do the same for EditorStringNames, because they are included in much more files and there is no single file that's included in all editor code.Note that it's rather unreasonable to enforce using singleton string names when available,. We could just replace some newly added strings from time to time. Maybe I'll make a helper script for that.