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

Rename a node on change type if it has the default name #18678

Closed
wants to merge 1 commit into from

Conversation

scayze
Copy link
Contributor

@scayze scayze commented May 7, 2018

Ahoy.

I always found it a little confusing that if i change the type of a node in the scene tree, the name of the node will remain the same.
i would end up with a node named "StaticBody2D" with a type of a RigidBody2D.

This commit would add that feature. But it will not rename the node when it has been renamed already.
Meaning that a Node2D called "Player" will still have that name when it type changes to eg. a KinematicBody.

@Geequlim
Copy link
Contributor

Geequlim commented May 7, 2018

This is useful feature

@groud groud added this to the 3.1 milestone May 7, 2018
@bojidar-bg
Copy link
Contributor

This will not work as it is in case the node/name_casing settings has been changed in the project settings. See #7509 for more details.

@bfloch
Copy link
Contributor

bfloch commented May 8, 2018

Just as side-note:
I made this which might end up in 3.1: #15928

It is not really a replacement for your proposal but it would allow you to change multiple nodes to their type name.

Edit: Also you might want to handle trailing numbers.

@akien-mga
Copy link
Member

We've discussed this in a PR review meeting today (sorry for the late update!), and we couldn't reach a consensus on this change. Some fear that such auto-refactoring would be more confusing to users than having the old default name for the new node (and could break scripts referencing the node by name).

So closing as we're not convinced it would be a net improvement.

@hsandt
Copy link
Contributor

hsandt commented Feb 12, 2019

Sorry, to dig up, but I've just had that issue, and thought that Change Type was not working or needed some refresh.
What about adding a checkbox so only users who don't fear breaking anything decide to auto-rename? It could even be a setting, so users who prefer this behaviour don't have to check the box every time.

@wyrmling
Copy link

What about adding a checkbox so only users who don't fear breaking anything decide to auto-rename?

In that case checkbox could be only:

  • in editor settings
  • in renaming popup, but only if name was not changed by user already

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

Successfully merging this pull request may close these issues.

8 participants