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

Support built-in scripts for inspector categories #40145

Merged
merged 1 commit into from
Jul 5, 2020

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jul 5, 2020

This is sort of follow-up to #32428 (which seems completely untested with built-in scripts btw).

It adds better support for built-in scripts in the inspector:

Notes:

  • (script->get_path() != String() && script->get_path().find("::") == -1)
    This condition is a result of a bug (probably). Built-in scripts seem to have empty path until the scene is saved, each time the scene is reloaded. The condition could be changed when that issue is resolved.
  • ERR_FAIL_COND(!s->is_valid());
    This prevents editor crash in case the script fails to load (could happen e.g. when the file is removed externally, perhabs).

@KoBeWi KoBeWi added this to the 4.0 milestone Jul 5, 2020
@aaronfranke
Copy link
Member

I'm going to be honest, I completely forgot that built-in scripts existed when I gave that a ✔️

@akien-mga akien-mga merged commit eb1d4ea into godotengine:master Jul 5, 2020
@akien-mga
Copy link
Member

Thanks!

@willnationsdev
Copy link
Contributor

Ah, crap, yeah, I should've caught that. My bad. I haven't checked GitHub in a little while, so that'd be why I didn't fix it earlier. Glad it got fixed quickly-ish.

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.

Editor crash when selecting a node with a built-in script
4 participants