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

Save external data even without scene #85513

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Nov 29, 2023

When using Ctrl+S without scene opened, it saves all modified resources. However it doesn't save external data of editor plugins that don't modify Resources.

This PR ensures that unsaved external data (based on get_unsaved_status()) is still saved even when there is no scene. This is mostly relevant for user plugins, as none of Godot's plugins modify non-Resource data AFAIK.

Probably a better solution would be modifying EditorData's save_editor_external_data() to work like _save_external_resources(), i.e. only save modified external data and return how many plugins were saved, but get_unsaved_status() is a recent addition and almost no plugin implements it.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give it a try :)

@akien-mga akien-mga merged commit 54dbb17 into godotengine:master Jun 26, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the that_one_weird_plugin_that_uses_no_Resources branch June 26, 2024 13:06
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.

2 participants