-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Improve save handling for built-in scripts #54653
Improve save handling for built-in scripts #54653
Conversation
606ab52
to
39dea65
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.
Looks good.
Would be good to apply the get_name
changed to text_editor
as well.
Not sure if we should also change the FILE_SAVE_ALL
action to take into account built-in
scripts.
if (script->is_built_in()) { | ||
continue; //internal script, who cares | ||
} | ||
|
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.
Second thoughts, rather then having a separate method and signal can we not handle it here?
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 _res_saved_callback
isn't called for built-in resources. I removed this check, but it was useless anyways.
Are built-in TextFiles even a thing? Also #28607 strikes again.
It would be easier if saving wasn't handled in multiple places :/
|
39dea65
to
9275b48
Compare
9275b48
to
134e4d1
Compare
So it turns out that saving scene when saving script brings many problems (who would've thought...). I had to move the |
Thanks! |
Would need a dedicated cherry-pick PR for |
This PR improves the way built-in scripts saved state/saving is handled, to bring them pretty on par with normal scripts.
Summary:
get_name()
method for that, but built-in scripts had some weird special case that omitted this method (even though the method itself also had a case for built-in scripts lol). I unified that