diff options
Diffstat (limited to 'editor/filesystem_dock.cpp')
| -rw-r--r-- | editor/filesystem_dock.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a47bbd321d..e6fd864d53 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -47,7 +47,7 @@ #include "editor/editor_string_names.h" #include "editor/gui/editor_dir_dialog.h" #include "editor/gui/editor_scene_tabs.h" -#include "editor/import/resource_importer_scene.h" +#include "editor/import/scene_import_settings.h" #include "editor/import_dock.h" #include "editor/plugins/editor_resource_tooltip_plugins.h" #include "editor/scene_create_dialog.h" @@ -1192,12 +1192,12 @@ void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorit String resource_type = ResourceLoader::get_resource_type(fpath); - if (resource_type == "PackedScene") { + if (resource_type == "PackedScene" || resource_type == "AnimationLibrary") { bool is_imported = false; { List<String> importer_exts; - ResourceImporterScene::get_scene_singleton()->get_recognized_extensions(&importer_exts); + ResourceImporterScene::get_scene_importer_extensions(&importer_exts); String extension = fpath.get_extension(); for (const String &E : importer_exts) { if (extension.nocasecmp_to(E) == 0) { @@ -1208,27 +1208,7 @@ void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorit } if (is_imported) { - ResourceImporterScene::get_scene_singleton()->show_advanced_options(fpath); - } else { - EditorNode::get_singleton()->open_request(fpath); - } - } else if (resource_type == "AnimationLibrary") { - bool is_imported = false; - - { - List<String> importer_exts; - ResourceImporterScene::get_animation_singleton()->get_recognized_extensions(&importer_exts); - String extension = fpath.get_extension(); - for (const String &E : importer_exts) { - if (extension.nocasecmp_to(E) == 0) { - is_imported = true; - break; - } - } - } - - if (is_imported) { - ResourceImporterScene::get_animation_singleton()->show_advanced_options(fpath); + SceneImportSettingsDialog::get_singleton()->open_settings(p_path, resource_type == "AnimationLibrary"); } else { EditorNode::get_singleton()->open_request(fpath); } |
