-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Allow configuring the script filename casing rule #78119
Conversation
There is a minor issue where adding script to Node2D with pascal case will name the script Node2d. Not sure how to fix it best tbh. Probably it's not important, because scripts are supposed to have different name. |
Do you think this can be in for Godot Engine 4.2? |
We are in feature freeze, so probably not. |
21d079e
to
882eb30
Compare
Do you think this can be in for Godot Engine 4.3? Edited: There are some github actions problems preventing merge. |
It does not seem related to my changes, so I assume it's a problem with the tests. |
882eb30
to
31ceac0
Compare
31ceac0
to
3cf51c6
Compare
@raulsntos Thanks for testing! I believe I've fixed both issues, as well as cleaning up the code further (it had a confusingly named variable "current_language" which contained outdated values after my changes). |
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.
Works as expected now, thank you!
Defaults to "Auto", which detects the casing based on the preference of the currently selected language (C# for example prefers PascalCase whereas GDScript prefers snake_case).
3cf51c6
to
2bd714e
Compare
Thanks! |
Supersedes #41991
Closes godotengine/godot-proposals#1211
Bugsquad edit: Closes godotengine/godot-proposals#5956
editor/naming/script_name_casing
which works similar to the scene equivalent.config
and_language_changed
. And the logic was also overly complex, with the amount of helper methods available to manipulate strings as file paths.editor/naming/scene_name_casing
for consistency, as it has also been added for script name.TODO
Find out whatOne is for the resource loader/saver, the other is for the script language.get_recognized_extensions
is and how it differs fromget_extension
.ScriptLanguageExtension changes cause an error that I can not figure out.Needed to bind the enum, fixed.