-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
In Create New Scene dialog derive the default root node name based on editor/naming/node_name_casing
#79756
Conversation
9906527
to
73248de
Compare
(force push was to fix style issue) |
The static method Lines 1199 to 1209 in 6588a4a
Also note that the |
Thanks for the info @dalexeev, I'll update the PR to use
I was wondering about these edge cases too, but since it's quite simple to change the name after the fact (or in the Create New Scene dialog) I'm not concerned about it. This PR should still improve the majority of cases (since the current workflow essentially requires you to rename everything manually, assuming a difference in naming convention between filenames and node names). One way to address that could be to show the converted name as placeholder text in realtime (as the scene name is modified). This way a user would be able to see if the name is converted as expected and, if needed, manually enter a name. Thoughts? |
godot/editor/scene_tree_dock.cpp Lines 2277 to 2281 in 6588a4a
The built-in classes are already named in PascalCase with the correct capitalization, so it's probably justified to do nothing for the PascalCase option. CC @KoBeWi |
@dalexeev I'm confused what you mean here. This PR is unrelated to the capitalization of built-in classes. Perhaps a screenshot will make this more clear: Also I pushed an update to use |
@sfreed141 Sorry, I confused this with another issue, since I don't use the dialog, but just press the plus button to add an empty scene tab. Then I think that it makes sense to capitalize as is, with Please squash your commits into one with a suitable message, according to the docs. |
1d12810
to
ee8ac84
Compare
Thanks for the feedback @dalexeev and @AThousandShips, the changes have been made and pushed. |
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.
Looks good to me and works great!
There is |
@KoBeWi @dalexeev thanks for the suggestions, I'll incorporate those into this PR. A question though: if the derived name contains invalid values is there a precedent for how to display that? Right now I'm thinking of having the placeholder text start with a " |
You could add a yellow warning message in the validation panel. |
ee8ac84
to
c0c1227
Compare
c0c1227
to
7b1cf07
Compare
(forgot a period) |
a9ee082
to
472158f
Compare
472158f
to
1ab7d1f
Compare
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.
Looks good to me. Thanks for your patience!
Thanks! And congrats for your first merged Godot contribution 🎉 |
Fixes #79751
This PR updates the Create New Scene dialog to respect the
editor/naming/node_name_casing
project setting for the root node name (when it's left empty). I also updated the placeholder text to be more accurate, as well as add a tooltip to the line edit control with more information (so users can discover the project setting if they aren't aware of it yet)