1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Improve save handling for built-in scripts

This commit is contained in:
kobewi
2021-12-04 01:12:52 +01:00
parent ade0e700f1
commit f899b76747
6 changed files with 94 additions and 45 deletions

View File

@@ -1548,8 +1548,10 @@ void EditorNode::_save_scene(String p_file, int idx) {
err = ResourceSaver::save(p_file, sdata, flg);
_save_external_resources();
// This needs to be emitted before saving external resources.
emit_signal("scene_saved", p_file);
_save_external_resources();
editor_data.save_editor_external_data();
for (List<Ref<AnimatedValuesBackup>>::Element *E = anim_backups.front(); E; E = E->next()) {
@@ -5668,6 +5670,7 @@ void EditorNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("request_help_search"));
ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::POOL_STRING_ARRAY, "args")));
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj")));
ADD_SIGNAL(MethodInfo("scene_saved", PropertyInfo(Variant::STRING, "path")));
}
static Node *_resource_get_edited_scene() {