Explorar o código

fix crash and error with texture atlas

- crashes at Project Export Settings > Preview Atlas
- error message when export project

```
ERROR: EditorImportExport::get_import_plugin_by_name: Condition ' !by_idx.has(p_string) ' is true. returned: Ref<EditorImportPlugin>()
   At: tools\editor\editor_import_export.cpp:1548
```

it is caused by https://github.com/godotengine/godot/commit/8be2fabbe5cd846bac5e5a38e55f3fb70e73f2da#diff-67a74bd708380c6b3baa717bb178dd47R802
volzhs %!s(int64=9) %!d(string=hai) anos
pai
achega
fc73f0c8b0
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      tools/editor/editor_import_export.cpp
  2. 1 1
      tools/editor/project_export.cpp

+ 1 - 1
tools/editor/editor_import_export.cpp

@@ -889,7 +889,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
 
 
 
-			Ref<EditorTextureImportPlugin> plugin = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture_atlas");
+			Ref<EditorTextureImportPlugin> plugin = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
 			Error err = plugin->import2(dst_file,imd,get_image_compression(),true);
 			if (err) {
 

+ 1 - 1
tools/editor/project_export.cpp

@@ -1057,7 +1057,7 @@ void ProjectExportDialog::_group_atlas_preview() {
 	imd->set_option("atlas",true);
 	imd->set_option("crop",true);
 
-	Ref<EditorTextureImportPlugin> plugin = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture_atlas");
+	Ref<EditorTextureImportPlugin> plugin = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
 	Error err = plugin->import2(dst_file,imd,EditorExportPlatform::IMAGE_COMPRESSION_NONE,true);
 	if (err) {