-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix an error when dragging nodes into built-in scripts because script does not inherit Node #81299
Conversation
This probably warrants a comment in the code, as it's not obvious why a script that has just been created would need to be reloaded. I also wonder if it's the right location for it or if it should be done after receiving |
As far as I can see, for no built_in scripts, it will get reloaded and compiled in |
fbe01d6
to
80d3a2a
Compare
80d3a2a
to
1d4201e
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.
The comment might need rewording (not sure about template; also instead of specifically referring to dropping nodes I think it should say that it makes type recognizable or something), but I can confirm this change fixes the issue.
I checked when external script are reloaded and it happens on save as you noted, but only when auto_reload_and_parse_scripts_on_save
editor setting is enabled. Otherwise the script will be reloaded when generating preview 🙃 (which also happens right after saving)
So I think this is a correct place to reload the script. Although it's weird that it isn't done automatically somewhere (in script editor maybe).
I will update it soon. |
1d4201e
to
d32348c
Compare
Thanks! |
Fixes #81294
Reload built_in script after create to allow drag nodes into it. Calling
reload
can compile the script and give it the inheritance info, thus can pass the check indrop_data_fw
.