You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Register and cleanup resource importer singletons in a predictable way
This commit is contained in:
@@ -6925,8 +6925,7 @@ EditorNode::EditorNode() {
|
||||
|
||||
{
|
||||
// Register importers at the beginning, so dialogs are created with the right extensions.
|
||||
Ref<ResourceImporterTexture> import_texture;
|
||||
import_texture.instantiate();
|
||||
Ref<ResourceImporterTexture> import_texture = memnew(ResourceImporterTexture(true));
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_texture);
|
||||
|
||||
Ref<ResourceImporterLayeredTexture> import_cubemap;
|
||||
@@ -6944,8 +6943,7 @@ EditorNode::EditorNode() {
|
||||
import_cubemap_array->set_mode(ResourceImporterLayeredTexture::MODE_CUBEMAP_ARRAY);
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_cubemap_array);
|
||||
|
||||
Ref<ResourceImporterLayeredTexture> import_3d;
|
||||
import_3d.instantiate();
|
||||
Ref<ResourceImporterLayeredTexture> import_3d = memnew(ResourceImporterLayeredTexture(true));
|
||||
import_3d->set_mode(ResourceImporterLayeredTexture::MODE_3D);
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_3d);
|
||||
|
||||
@@ -6985,12 +6983,10 @@ EditorNode::EditorNode() {
|
||||
import_shader_file.instantiate();
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_shader_file);
|
||||
|
||||
Ref<ResourceImporterScene> import_scene;
|
||||
import_scene.instantiate();
|
||||
Ref<ResourceImporterScene> import_scene = memnew(ResourceImporterScene(false, true));
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_scene);
|
||||
|
||||
Ref<ResourceImporterScene> import_animation;
|
||||
import_animation = Ref<ResourceImporterScene>(memnew(ResourceImporterScene(true)));
|
||||
Ref<ResourceImporterScene> import_animation = memnew(ResourceImporterScene(true, true));
|
||||
ResourceFormatImporter::get_singleton()->add_importer(import_animation);
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user