Skip to content
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

When creating a new scene the default root node name doesn't respect the editor/naming/node_name_casing project setting #79751

Closed
sfreed141 opened this issue Jul 21, 2023 · 2 comments · Fixed by #79756

Comments

@sfreed141
Copy link
Contributor

Godot version

4.1.stable

System information

Windows 11

Issue description

The Create New Scene dialog always defaults the scene root node name to the filename. If you're following the recommended (and default) naming conventions for filenames (snake_case) and node names (PascalCase), this default name always needs to be changed. It would be lovely if the default root node name respected the editor/naming/node_name_casing project setting.

Also, I have already implemented this in my fork and would be happy to contribute it. This was my "dip my toes" into Godot engine development idea since it was simple and has bothered me for a while. I consider this more of an oversight bug than a feature proposal which is why I'm opening the issue here instead of on the proposals repo.

Steps to reproduce

  1. Create and open new project
  2. (only if you've changed this) In project settings set editor/naming/node_name_casing to PascalCase
  3. In Filesystem view, right click | Create new | Scene
  4. Enter a filename like "test_scene" and click Ok

Notice the root node of the new scene will also be named "test_scene" instead of "TestScene"

Minimal reproduction project

N/A

@ghost
Copy link

ghost commented Jul 21, 2023

This also affects the project's root window.

print(get_tree().root.name)
root # should be Root to follow the node name casing

@dalexeev
Copy link
Member

This also affects the project's root window.

I believe it has nothing to do with the setting. The root node is created by the engine, you cannot specify its name. We should not change the name for the reason of absolute path compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants