-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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 prefixing with '%' to set a node as unique in the Scene Tree Dock #101163
Conversation
so cool! wowee! love me some QoL |
a5b789e
to
8347a1f
Compare
I tried this and it works as described. The code looks ok too. There are two things that i noticed:
|
The worse part is that this discards your name. Showing warning is probably fine, but the node should still be renamed, just without unique name. |
Thanks for the suggestions, @badsectoracula and @KoBeWi!
|
8347a1f
to
0c62d46
Compare
It looks like renaming to "Foo2" would either need some changes in scene/main/node.cpp since it currently only supports renumbering of child nodes, or duplicating the similar logic to the function, which would make it very complex. So that is probably out-of-scope for this PR. But perhaps it can be implemented in a future PR. For now, I will use @KoBeWi's suggestion. Also fixed a bug where adding "%" without changing the rest of the name while there is already a unique node with the same name does not show a warning. Edit: Also rebased from master. That's why the comparison between force-pushes way more complex than it should. |
Changing node name to (different) unique one will create 2 undo actions. I think it should be one. |
0c62d46
to
41aa5ea
Compare
This makes sense since only one action was done by the user. I decided to set them as one action. |
41aa5ea
to
542e9bb
Compare
542e9bb
to
067d1ce
Compare
067d1ce
to
9d00a77
Compare
Thanks! And congrats for your first merged Godot contribution 🎉 |
Closes godotengine/godot-proposals#11386. This allows users to set any node (except for root nodes) as unique while renaming it by simply prefixing with "%". Feel free to request changes.