1
0
Fork 0
This commit is contained in:
Hugo Locurcio 2025-02-28 01:36:43 +01:00 committed by GitHub
commit 427e2288fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 8 deletions

View File

@ -1233,7 +1233,7 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
void EditorAudioBuses::_server_save() {
Ref<AudioBusLayout> 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;

View File

@ -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;

View File

@ -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));

View File

@ -173,7 +173,7 @@ void VoxelGIEditorPlugin::_voxel_gi_save_path_and_bake(const String &p_path) {
Ref<VoxelGIData> 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);
}
}

View File

@ -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;

View File

@ -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;