Przeglądaj źródła

Complete changing of resource extensions

Some places were missing in e42d59f.
George Marques 8 lat temu
rodzic
commit
7966ebe6fa

+ 2 - 2
editor/editor_export.cpp

@@ -1943,14 +1943,14 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
 				atex->set_region(region);
 				atex->set_margin(margin);
 
-				String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atex";
+				String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atlastex";
 				Error err = ResourceSaver::save(path,atex);
 				if (err!=OK) {
 					EditorNode::add_io_error(TTR("Could not save atlas subtexture:")+" "+path);
 					return ERR_CANT_CREATE;
 				}
 				Vector<uint8_t> data = FileAccess::get_file_as_array(path);
-				String dst_path = F->get().operator String().get_basename()+".atex";
+				String dst_path = F->get().operator String().get_basename()+".atlastex";
 				err = p_func(p_udata,dst_path,data,counter++,files.size());
 				saved.insert(dst_path);
 				if (err)

+ 2 - 2
editor/editor_settings.cpp

@@ -508,7 +508,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
 	set("interface/source_font_size", 14);
 	hints["interface/source_font_size"] = PropertyInfo(Variant::INT, "interface/source_font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
 	set("interface/custom_font", "");
-	hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.fnt", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+	hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
 	set("interface/dim_editor_on_dialog_popup", true);
 	set("interface/dim_amount", 0.6f);
 	hints["interface/dim_amount"] = PropertyInfo(Variant::REAL, "interface/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
@@ -581,7 +581,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
 	hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.1");
 
 	set("text_editor/theme/font", "");
-	hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.fnt");
+	hints["text_editor/theme/font"] = PropertyInfo(Variant::STRING, "text_editor/theme/font", PROPERTY_HINT_GLOBAL_FILE, "*.font");
 	set("text_editor/completion/auto_brace_complete", false);
 	set("text_editor/files/restore_scripts_on_load", true);
 	set("text_editor/completion/complete_file_paths", true);

+ 1 - 1
editor/import/resource_importer_csv_translation.cpp

@@ -128,7 +128,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
 			xlt = cxl;
 		}
 
-		String save_path = p_source_file.get_basename() + "." + translations[i]->get_locale() + ".xl";
+		String save_path = p_source_file.get_basename() + "." + translations[i]->get_locale() + ".translation";
 
 		ResourceSaver::save(save_path, xlt);
 		if (r_gen_files) {

+ 1 - 2
editor/import/resource_importer_obj.cpp

@@ -33,7 +33,6 @@
 #include "os/file_access.h"
 #include "scene/resources/mesh.h"
 #include "scene/resources/surface_tool.h"
-#include "scene/resources/surface_tool.h"
 
 String ResourceImporterOBJ::get_importer_name() const {
 
@@ -244,7 +243,7 @@ Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_s
 	}
 */
 
-	Error err = ResourceSaver::save(p_save_path + ".msh", mesh);
+	Error err = ResourceSaver::save(p_save_path + ".mesh", mesh);
 
 	return err;
 }

+ 3 - 3
editor/import/resource_importer_scene.cpp

@@ -987,7 +987,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
 
 				if (!p_materials.has(mat)) {
 
-					String ext_name = p_base_path + "." + _make_extname(mat->get_name()) + ".mtl";
+					String ext_name = p_base_path + "." + _make_extname(mat->get_name()) + ".material";
 					if (FileAccess::exists(ext_name)) {
 						//if exists, use it
 						Ref<Material> existing = ResourceLoader::load(ext_name);
@@ -1015,7 +1015,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
 
 						if (!p_meshes.has(mesh)) {
 
-							String ext_name = p_base_path + "." + _make_extname(mesh->get_name()) + ".msh";
+							String ext_name = p_base_path + "." + _make_extname(mesh->get_name()) + ".mesh";
 							if (FileAccess::exists(ext_name)) {
 								//if exists, use it
 								Ref<ArrayMesh> existing = ResourceLoader::load(ext_name);
@@ -1040,7 +1040,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
 
 								if (!p_materials.has(mat)) {
 
-									String ext_name = p_base_path + "." + _make_extname(mat->get_name()) + ".mtl";
+									String ext_name = p_base_path + "." + _make_extname(mat->get_name()) + ".material";
 									if (FileAccess::exists(ext_name)) {
 										//if exists, use it
 										Ref<Material> existing = ResourceLoader::load(ext_name);

+ 1 - 1
editor/import/resource_importer_wav.cpp

@@ -485,7 +485,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
 	sample->set_loop_end(loop_end);
 	sample->set_stereo(format_channels == 2);
 
-	ResourceSaver::save(p_save_path + ".smp", sample);
+	ResourceSaver::save(p_save_path + ".sample", sample);
 
 	return OK;
 }

+ 1 - 1
editor/io_plugins/editor_mesh_import_plugin.cpp

@@ -262,7 +262,7 @@ public:
 
 			imd->add_source(EditorImportPlugin::validate_source_path(meshes[i]));
 
-			String file_path = dst.plus_file(meshes[i].get_file().get_basename()+".msh");
+			String file_path = dst.plus_file(meshes[i].get_file().get_basename()+".mesh");
 
 			plugin->import(file_path,imd);
 		}

+ 3 - 3
editor/io_plugins/editor_sample_import_plugin.cpp

@@ -299,7 +299,7 @@ public:
 				error_dialog->popup_centered(Size2(200,100)*EDSCALE);
 			}
 
-			dst = dst.plus_file(samples[i].get_file().get_basename()+".smp");
+			dst = dst.plus_file(samples[i].get_file().get_basename()+".sample");
 
 			plugin->import(dst,imd);
 		}
@@ -910,13 +910,13 @@ Vector<uint8_t> EditorSampleExportPlugin::custom_export(String& p_path,const Ref
 	imd->set_option("edit/loop",false);
 	imd->set_option("compress/mode",1);
 
-	String savepath = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/smpconv.smp");
+	String savepath = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/smpconv.sample");
 	Error err = EditorSampleImportPlugin::singleton->import(savepath,imd);
 
 
 	ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
 
-	p_path=p_path.get_basename()+".converted.smp";
+	p_path=p_path.get_basename()+".converted.sample";
 	return FileAccess::get_file_as_array(savepath);
 
 }

+ 3 - 3
editor/io_plugins/editor_texture_import_plugin.cpp

@@ -1097,7 +1097,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
 		int cell_size=from->get_option("large_cell_size");
 		ERR_FAIL_COND_V(cell_size<128 || cell_size>16384,ERR_CANT_OPEN);
 
-		EditorProgress pg("ltex",TTR("Import Large Texture"),3);
+		EditorProgress pg("largetex",TTR("Import Large Texture"),3);
 
 		pg.step(TTR("Load Source Image"),0);
 		Image img;
@@ -1317,9 +1317,9 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
 				String spath = from->get_source_path(E->get()).get_file();
 
 				if (p_external) {
-					apath = p_path.get_base_dir().plus_file(spath.get_basename()+"."+from->get_source_path(E->get()).md5_text()+".atex");
+					apath = p_path.get_base_dir().plus_file(spath.get_basename()+"."+from->get_source_path(E->get()).md5_text()+".atlastex");
 				} else {
-					apath = p_path.get_base_dir().plus_file(spath.get_basename()+".atex");
+					apath = p_path.get_base_dir().plus_file(spath.get_basename()+".atlastex");
 				}
 
 				Ref<AtlasTexture> at;

+ 1 - 1
editor/io_plugins/editor_translation_import_plugin.cpp

@@ -258,7 +258,7 @@ public:
 			imd->set_option("skip_first",ignore_first->is_pressed());
 			imd->set_option("compress",compress->is_pressed());
 
-			String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+"."+locale+".xl");
+			String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+"."+locale+".translation");
 			Error err = plugin->import(savefile,imd);
 			if (err!=OK) {
 				error_dialog->set_text(TTR("Couldn't import!"));

+ 1 - 1
modules/stb_vorbis/resource_importer_ogg_vorbis.cpp

@@ -99,7 +99,7 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
 	ogg_stream->set_data(data);
 	ogg_stream->set_loop(loop);
 
-	return ResourceSaver::save(p_save_path + ".asogg", ogg_stream);
+	return ResourceSaver::save(p_save_path + ".oggstr", ogg_stream);
 }
 
 ResourceImporterOGGVorbis::ResourceImporterOGGVorbis() {

+ 1 - 1
scene/register_scene_types.cpp

@@ -274,7 +274,7 @@ void register_scene_types() {
 	String theme_path = GLOBAL_DEF("gui/theme/custom", "");
 	GlobalConfig::get_singleton()->set_custom_property_info("gui/theme/custom", PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
 	String font_path = GLOBAL_DEF("gui/theme/custom_font", "");
-	GlobalConfig::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.fnt", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
+	GlobalConfig::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.font", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
 
 	if (theme_path != String()) {
 		Ref<Theme> theme = ResourceLoader::load(theme_path);