diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 9881087b3e3..1f15ec738b4 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1233,7 +1233,7 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) { void EditorAudioBuses::_server_save() { Ref state = AudioServer::get_singleton()->generate_bus_layout(); - ResourceSaver::save(state, edited_path); + ResourceSaver::save(state, edited_path, ResourceSaver::FLAG_COMPRESS); } void EditorAudioBuses::_select_layout() { @@ -1276,7 +1276,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) { AudioServer::get_singleton()->set_bus_layout(empty_state); } - Error err = ResourceSaver::save(AudioServer::get_singleton()->generate_bus_layout(), p_string); + Error err = ResourceSaver::save(AudioServer::get_singleton()->generate_bus_layout(), p_string, ResourceSaver::FLAG_COMPRESS); if (err != OK) { EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_string)); return; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 6b725240f9e..b1bee05ab2d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2196,7 +2196,7 @@ void EditorNode::_dialog_action(String p_file) { MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(), ml, merge_with_existing_library, apply_mesh_instance_transforms); - Error err = ResourceSaver::save(ml, p_file); + Error err = ResourceSaver::save(ml, p_file, ResourceSaver::FLAG_COMPRESS); if (err) { show_accept(TTR("Error saving MeshLibrary!"), TTR("OK")); return; diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index 5b07b9dd5ea..52d0b6b48fd 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -663,7 +663,7 @@ void Skeleton3DEditor::_file_selected(const String &p_file) { } } - Error err = ResourceSaver::save(sp, p_file); + Error err = ResourceSaver::save(sp, p_file, ResourceSaver::FLAG_COMPRESS); if (err != OK) { EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_file)); diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp index 245ef22bad7..e65374dc66e 100644 --- a/editor/plugins/voxel_gi_editor_plugin.cpp +++ b/editor/plugins/voxel_gi_editor_plugin.cpp @@ -173,7 +173,7 @@ void VoxelGIEditorPlugin::_voxel_gi_save_path_and_bake(const String &p_path) { Ref voxel_gi_data = voxel_gi->get_probe_data(); ERR_FAIL_COND(voxel_gi_data.is_null()); voxel_gi_data->set_path(p_path); - ResourceSaver::save(voxel_gi_data, p_path, ResourceSaver::FLAG_CHANGE_PATH); + ResourceSaver::save(voxel_gi_data, p_path, ResourceSaver::FLAG_CHANGE_PATH | ResourceSaver::FLAG_COMPRESS); } } diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 8f21260d573..69e5fcca39d 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -1468,8 +1468,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa /* Compute a BSP tree of the simplices, so it's easy to find the exact one */ } - gi_data->set_path(p_image_data_path, true); - Error err = ResourceSaver::save(gi_data); + Error err = ResourceSaver::save(gi_data, "", ResourceSaver::FLAG_COMPRESS); if (err != OK) { return BAKE_ERROR_CANT_CREATE_IMAGE; diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp index 6d88323c76d..6d59dbaf6d0 100644 --- a/scene/3d/occluder_instance_3d.cpp +++ b/scene/3d/occluder_instance_3d.cpp @@ -678,7 +678,7 @@ OccluderInstance3D::BakeError OccluderInstance3D::bake_scene(Node *p_from_node, occ->set_arrays(vertices, indices); - Error err = ResourceSaver::save(occ, p_occluder_path); + Error err = ResourceSaver::save(occ, p_occluder_path, ResourceSaver::FLAG_COMPRESS); if (err != OK) { return BAKE_ERROR_CANT_SAVE;