-
-
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
Assume root when dropping node to unassigned script #79258
Conversation
The second video shows that |
9aba405
to
b6ee2ff
Compare
It could be argued that dropping just the NodePath (drop without Ctrl pressed) should be allowed though. 🤔 I mean Node-deriving is needed only if |
idk, I think I never needed node paths in resources. It could be easily implemented if someone wants it, but for now I'd stay with nodes only. |
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.
LGTM.
As mentioned, dropping NodePaths to non-Nodes could be allowed later if/when requested (in the meantime NodePaths can be copied manually from the scene tree dock anyway).
b6ee2ff
to
3f272f4
Compare
godot.windows.editor.dev.x86_64_ZIN4VSbHhF.mp4 |
Thanks! |
When dropping a node to Script Editor, you will sometimes get the arbitrary error that the script is nowhere in the scene:
godot.windows.editor.dev.x86_64_OKhG6zXBp7.mp4
The error may appear in valid scenarios, e.g. when dropping node into parent script. In any case, I think it's less relevant now that we have scene unique names, as the hierarchy does not matter that much.
With this PR, if a script is not found in the scene, the editor will assume that the node is relative to scene's root (which, again, is irrelevant if the node has unique name). Here's me casually dropping a node into random EditorScript:
godot.windows.editor.dev.x86_64_oyd0AnwWoF.mp4