diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b2504e16705..2cb545801e1 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6888,10 +6888,10 @@ EditorNode::EditorNode() { import_shader_file.instantiate(); ResourceFormatImporter::get_singleton()->add_importer(import_shader_file); - Ref import_scene = memnew(ResourceImporterScene(false, true)); + Ref import_scene = memnew(ResourceImporterScene("PackedScene", true)); ResourceFormatImporter::get_singleton()->add_importer(import_scene); - Ref import_animation = memnew(ResourceImporterScene(true, true)); + Ref import_animation = memnew(ResourceImporterScene("AnimationLibrary", true)); ResourceFormatImporter::get_singleton()->add_importer(import_animation); { diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a9de8e3bc5d..bfb71239258 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1216,7 +1216,7 @@ void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorit } if (is_imported) { - SceneImportSettingsDialog::get_singleton()->open_settings(p_path, resource_type == "AnimationLibrary"); + SceneImportSettingsDialog::get_singleton()->open_settings(p_path, resource_type); } else if (resource_type == "PackedScene") { EditorNode::get_singleton()->open_request(fpath); } else { diff --git a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp index b69d38afa06..a8886b3818d 100644 --- a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp +++ b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp @@ -54,7 +54,7 @@ void PostImportPluginSkeletonRestFixer::get_internal_import_options(InternalImpo } } -Variant PostImportPluginSkeletonRestFixer::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap &p_options) const { +Variant PostImportPluginSkeletonRestFixer::get_internal_option_visibility(InternalImportCategory p_category, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const { if (p_category == INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE) { if (p_option.begins_with("retarget/rest_fixer/fix_silhouette/")) { if (!bool(p_options["retarget/rest_fixer/fix_silhouette/enable"])) { diff --git a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.h b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.h index 1750ed12331..9fec76be489 100644 --- a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.h +++ b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.h @@ -38,7 +38,7 @@ class PostImportPluginSkeletonRestFixer : public EditorScenePostImportPlugin { public: virtual void get_internal_import_options(InternalImportCategory p_category, List *r_options) override; - virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap &p_options) const override; + virtual Variant get_internal_option_visibility(InternalImportCategory p_category, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const override; virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref p_resource, const Dictionary &p_options) override; PostImportPluginSkeletonRestFixer(); diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp index d0d7142c01d..853e3e813b1 100644 --- a/editor/import/3d/resource_importer_scene.cpp +++ b/editor/import/3d/resource_importer_scene.cpp @@ -96,9 +96,10 @@ void EditorSceneFormatImporter::get_import_options(const String &p_path, List &p_options) { +Variant EditorSceneFormatImporter::get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) { Variant ret; - GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); + // For compatibility with the old API, pass the import type as a boolean. + GDVIRTUAL_CALL(_get_option_visibility, p_path, p_scene_import_type == "AnimationLibrary", p_option, ret); return ret; } @@ -172,13 +173,16 @@ void EditorScenePostImportPlugin::get_internal_import_options(InternalImportCate GDVIRTUAL_CALL(_get_internal_import_options, p_category); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap &p_options) const { + +Variant EditorScenePostImportPlugin::get_internal_option_visibility(InternalImportCategory p_category, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const { current_options = &p_options; Variant ret; - GDVIRTUAL_CALL(_get_internal_option_visibility, p_category, p_for_animation, p_option, ret); + // For compatibility with the old API, pass the import type as a boolean. + GDVIRTUAL_CALL(_get_internal_option_visibility, p_category, p_scene_import_type == "AnimationLibrary", p_option, ret); current_options = nullptr; return ret; } + Variant EditorScenePostImportPlugin::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap &p_options) const { current_options = &p_options; Variant ret; @@ -198,10 +202,10 @@ void EditorScenePostImportPlugin::get_import_options(const String &p_path, List< GDVIRTUAL_CALL(_get_import_options, p_path); current_option_list = nullptr; } -Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap &p_options) const { +Variant EditorScenePostImportPlugin::get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const { current_options = &p_options; Variant ret; - GDVIRTUAL_CALL(_get_option_visibility, p_path, p_for_animation, p_option, ret); + GDVIRTUAL_CALL(_get_option_visibility, p_path, p_scene_import_type == "AnimationLibrary", p_option, ret); current_options = nullptr; return ret; } @@ -245,11 +249,22 @@ void EditorScenePostImportPlugin::_bind_methods() { ///////////////////////////////////////////////////////// String ResourceImporterScene::get_importer_name() const { - return animation_importer ? "animation_library" : "scene"; + // For compatibility with 4.2 and earlier we need to keep the "scene" and "animation_library" names. + // However this is arbitrary so for new import types we can use any string. + if (_scene_import_type == "PackedScene") { + return "scene"; + } else if (_scene_import_type == "AnimationLibrary") { + return "animation_library"; + } + return _scene_import_type; } String ResourceImporterScene::get_visible_name() const { - return animation_importer ? "Animation Library" : "Scene"; + // This is displayed on the UI. Friendly names here are nice but not vital, so fall back to the type. + if (_scene_import_type == "PackedScene") { + return "Scene"; + } + return _scene_import_type.capitalize(); } void ResourceImporterScene::get_recognized_extensions(List *p_extensions) const { @@ -257,11 +272,14 @@ void ResourceImporterScene::get_recognized_extensions(List *p_extensions } String ResourceImporterScene::get_save_extension() const { - return animation_importer ? "res" : "scn"; + if (_scene_import_type == "PackedScene") { + return "scn"; + } + return "res"; } String ResourceImporterScene::get_resource_type() const { - return animation_importer ? "AnimationLibrary" : "PackedScene"; + return _scene_import_type; } int ResourceImporterScene::get_format_version() const { @@ -269,27 +287,28 @@ int ResourceImporterScene::get_format_version() const { } bool ResourceImporterScene::get_option_visibility(const String &p_path, const String &p_option, const HashMap &p_options) const { - if (animation_importer) { + if (_scene_import_type == "PackedScene") { + if (p_option.begins_with("animation/")) { + if (p_option != "animation/import" && !bool(p_options["animation/import"])) { + return false; + } + } + } else if (_scene_import_type == "AnimationLibrary") { if (p_option == "animation/import") { // Option ignored, animation always imported. return false; } - } else if (p_option.begins_with("animation/")) { - if (p_option != "animation/import" && !bool(p_options["animation/import"])) { - return false; + if (p_option == "nodes/root_type" || p_option == "nodes/root_name" || p_option.begins_with("meshes/") || p_option.begins_with("skins/")) { + return false; // Nothing to do here for animations. } } - if (animation_importer && (p_option == "nodes/root_type" || p_option == "nodes/root_name" || p_option.begins_with("meshes/") || p_option.begins_with("skins/"))) { - return false; // Nothing to do here for animations. - } - if (p_option == "meshes/lightmap_texel_size" && int(p_options["meshes/light_baking"]) != 2) { // Only display the lightmap texel size import option when using the Static Lightmaps light baking mode. return false; } for (int i = 0; i < post_importer_plugins.size(); i++) { - Variant ret = post_importer_plugins.write[i]->get_option_visibility(p_path, animation_importer, p_option, p_options); + Variant ret = post_importer_plugins.write[i]->get_option_visibility(p_path, _scene_import_type, p_option, p_options); if (ret.get_type() == Variant::BOOL) { if (!ret) { return false; @@ -298,7 +317,7 @@ bool ResourceImporterScene::get_option_visibility(const String &p_path, const St } for (Ref importer : scene_importers) { - Variant ret = importer->get_option_visibility(p_path, animation_importer, p_option, p_options); + Variant ret = importer->get_option_visibility(p_path, _scene_import_type, p_option, p_options); if (ret.get_type() == Variant::BOOL) { if (!ret) { return false; @@ -2283,7 +2302,7 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor } for (int i = 0; i < post_importer_plugins.size(); i++) { - Variant ret = post_importer_plugins.write[i]->get_internal_option_visibility(EditorScenePostImportPlugin::InternalImportCategory(p_category), animation_importer, p_option, p_options); + Variant ret = post_importer_plugins.write[i]->get_internal_option_visibility(EditorScenePostImportPlugin::InternalImportCategory(p_category), _scene_import_type, p_option, p_options); if (ret.get_type() == Variant::BOOL) { return ret; } @@ -2877,13 +2896,11 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p int import_flags = 0; - if (animation_importer) { + if (_scene_import_type == "AnimationLibrary") { import_flags |= EditorSceneFormatImporter::IMPORT_ANIMATION; import_flags |= EditorSceneFormatImporter::IMPORT_DISCARD_MESHES_AND_MATERIALS; - } else { - if (bool(p_options["animation/import"])) { - import_flags |= EditorSceneFormatImporter::IMPORT_ANIMATION; - } + } else if (bool(p_options["animation/import"])) { + import_flags |= EditorSceneFormatImporter::IMPORT_ANIMATION; } if (bool(p_options["skins/use_named_skins"])) { @@ -3101,7 +3118,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p flags |= ResourceSaver::FLAG_COMPRESS; } - if (animation_importer) { + if (_scene_import_type == "AnimationLibrary") { Ref library; for (int i = 0; i < scene->get_child_count(); i++) { AnimationPlayer *ap = Object::cast_to(scene->get_child(i)); @@ -3122,13 +3139,14 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p print_verbose("Saving animation to: " + p_save_path + ".res"); err = ResourceSaver::save(library, p_save_path + ".res", flags); //do not take over, let the changed files reload themselves ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save animation to file '" + p_save_path + ".res'."); - - } else { + } else if (_scene_import_type == "PackedScene") { Ref packer = memnew(PackedScene); packer->pack(scene); print_verbose("Saving scene to: " + p_save_path + ".scn"); err = ResourceSaver::save(packer, p_save_path + ".scn", flags); //do not take over, let the changed files reload themselves ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save scene to file '" + p_save_path + ".scn'."); + } else { + ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Unknown scene import type: " + _scene_import_type); } memdelete(scene); @@ -3150,20 +3168,20 @@ bool ResourceImporterScene::has_advanced_options() const { } void ResourceImporterScene::show_advanced_options(const String &p_path) { - SceneImportSettingsDialog::get_singleton()->open_settings(p_path, animation_importer); + SceneImportSettingsDialog::get_singleton()->open_settings(p_path, _scene_import_type); } -ResourceImporterScene::ResourceImporterScene(bool p_animation_import, bool p_singleton) { +ResourceImporterScene::ResourceImporterScene(const String &p_scene_import_type, bool p_singleton) { // This should only be set through the EditorNode. if (p_singleton) { - if (p_animation_import) { + if (p_scene_import_type == "AnimationLibrary") { animation_singleton = this; - } else { + } else if (p_scene_import_type == "PackedScene") { scene_singleton = this; } } - animation_importer = p_animation_import; + _scene_import_type = p_scene_import_type; } ResourceImporterScene::~ResourceImporterScene() { diff --git a/editor/import/3d/resource_importer_scene.h b/editor/import/3d/resource_importer_scene.h index f9124ad2891..9759f328d77 100644 --- a/editor/import/3d/resource_importer_scene.h +++ b/editor/import/3d/resource_importer_scene.h @@ -44,10 +44,10 @@ #include "scene/resources/animation.h" #include "scene/resources/mesh.h" -class Material; class AnimationPlayer; - class ImporterMesh; +class Material; + class EditorSceneFormatImporter : public RefCounted { GDCLASS(EditorSceneFormatImporter, RefCounted); @@ -78,7 +78,7 @@ public: virtual void get_extensions(List *r_extensions) const; virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap &p_options, List *r_missing_deps, Error *r_err = nullptr); virtual void get_import_options(const String &p_path, List *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap &p_options); + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options); virtual void handle_compatibility_options(HashMap &p_import_params) const {} EditorSceneFormatImporter() {} @@ -140,13 +140,13 @@ public: void add_import_option_advanced(Variant::Type p_type, const String &p_name, const Variant &p_default_value, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = String(), int p_usage_flags = PROPERTY_USAGE_DEFAULT); virtual void get_internal_import_options(InternalImportCategory p_category, List *r_options); - virtual Variant get_internal_option_visibility(InternalImportCategory p_category, bool p_for_animation, const String &p_option, const HashMap &p_options) const; + virtual Variant get_internal_option_visibility(InternalImportCategory p_category, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const; virtual Variant get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const HashMap &p_options) const; virtual void internal_process(InternalImportCategory p_category, Node *p_base_scene, Node *p_node, Ref p_resource, const Dictionary &p_options); virtual void get_import_options(const String &p_path, List *r_options); - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap &p_options) const; + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) const; virtual void pre_process(Node *p_scene, const HashMap &p_options); virtual void post_process(Node *p_scene, const HashMap &p_options); @@ -237,7 +237,7 @@ class ResourceImporterScene : public ResourceImporter { void _optimize_track_usage(AnimationPlayer *p_player, AnimationImportTracks *p_track_actions); - bool animation_importer = false; + String _scene_import_type = "PackedScene"; public: static ResourceImporterScene *get_scene_singleton() { return scene_singleton; } @@ -253,6 +253,9 @@ public: static void clean_up_importer_plugins(); + String get_scene_import_type() const { return _scene_import_type; } + void set_scene_import_type(const String &p_type) { _scene_import_type = p_type; } + virtual String get_importer_name() const override; virtual String get_visible_name() const override; virtual void get_recognized_extensions(List *p_extensions) const override; @@ -303,7 +306,7 @@ public: virtual bool can_import_threaded() const override { return false; } - ResourceImporterScene(bool p_animation_import = false, bool p_singleton = false); + ResourceImporterScene(const String &p_scene_import_type = "PackedScene", bool p_singleton = false); ~ResourceImporterScene(); template diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp index 7cd5279b635..7ca3cb6c3a4 100644 --- a/editor/import/3d/scene_import_settings.cpp +++ b/editor/import/3d/scene_import_settings.cpp @@ -678,26 +678,26 @@ void SceneImportSettingsDialog::update_view() { update_view_timer->start(); } -void SceneImportSettingsDialog::open_settings(const String &p_path, bool p_for_animation) { +void SceneImportSettingsDialog::open_settings(const String &p_path, const String &p_scene_import_type) { if (scene) { _cleanup(); memdelete(scene); scene = nullptr; } - editing_animation = p_for_animation; + editing_animation = p_scene_import_type == "AnimationLibrary"; scene_import_settings_data->settings = nullptr; scene_import_settings_data->path = p_path; // Visibility. - data_mode->set_tab_hidden(1, p_for_animation); - data_mode->set_tab_hidden(2, p_for_animation); - if (p_for_animation) { + data_mode->set_tab_hidden(1, editing_animation); + data_mode->set_tab_hidden(2, editing_animation); + if (editing_animation) { data_mode->set_current_tab(0); } - action_menu->get_popup()->set_item_disabled(action_menu->get_popup()->get_item_id(ACTION_EXTRACT_MATERIALS), p_for_animation); - action_menu->get_popup()->set_item_disabled(action_menu->get_popup()->get_item_id(ACTION_CHOOSE_MESH_SAVE_PATHS), p_for_animation); + action_menu->get_popup()->set_item_disabled(action_menu->get_popup()->get_item_id(ACTION_EXTRACT_MATERIALS), editing_animation); + action_menu->get_popup()->set_item_disabled(action_menu->get_popup()->get_item_id(ACTION_CHOOSE_MESH_SAVE_PATHS), editing_animation); base_path = p_path; @@ -771,7 +771,7 @@ void SceneImportSettingsDialog::open_settings(const String &p_path, bool p_for_a // Start with the root item (Scene) selected. scene_tree->get_root()->select(0); - if (p_for_animation) { + if (editing_animation) { set_title(vformat(TTR("Advanced Import Settings for AnimationLibrary '%s'"), base_path.get_file())); } else { set_title(vformat(TTR("Advanced Import Settings for Scene '%s'"), base_path.get_file())); diff --git a/editor/import/3d/scene_import_settings.h b/editor/import/3d/scene_import_settings.h index c2a5151432d..bbd0d2c22db 100644 --- a/editor/import/3d/scene_import_settings.h +++ b/editor/import/3d/scene_import_settings.h @@ -243,7 +243,7 @@ public: bool is_editing_animation() const { return editing_animation; } void request_generate_collider(); void update_view(); - void open_settings(const String &p_path, bool p_for_animation = false); + void open_settings(const String &p_path, const String &p_scene_import_type = "PackedScene"); static SceneImportSettingsDialog *get_singleton(); Node *get_selected_node(); SceneImportSettingsDialog(); diff --git a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp index daa4db37dff..f5b19f803ae 100644 --- a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp +++ b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp @@ -124,7 +124,7 @@ Node *EditorSceneFormatImporterFBX2GLTF::import_scene(const String &p_path, uint #endif } -Variant EditorSceneFormatImporterFBX2GLTF::get_option_visibility(const String &p_path, bool p_for_animation, +Variant EditorSceneFormatImporterFBX2GLTF::get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) { // Remove all the FBX options except for 'fbx/importer' if the importer is fbx2gltf. // These options are available only for ufbx. diff --git a/modules/fbx/editor/editor_scene_importer_fbx2gltf.h b/modules/fbx/editor/editor_scene_importer_fbx2gltf.h index c68e37f0d80..ce2bac6fcf3 100644 --- a/modules/fbx/editor/editor_scene_importer_fbx2gltf.h +++ b/modules/fbx/editor/editor_scene_importer_fbx2gltf.h @@ -49,7 +49,7 @@ public: List *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List *r_options) override; - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) override; virtual void handle_compatibility_options(HashMap &p_import_params) const override; }; diff --git a/modules/fbx/editor/editor_scene_importer_ufbx.cpp b/modules/fbx/editor/editor_scene_importer_ufbx.cpp index 4d5f2205398..64075c06643 100644 --- a/modules/fbx/editor/editor_scene_importer_ufbx.cpp +++ b/modules/fbx/editor/editor_scene_importer_ufbx.cpp @@ -88,7 +88,7 @@ Node *EditorSceneFormatImporterUFBX::import_scene(const String &p_path, uint32_t return fbx->generate_scene(state, state->get_bake_fps(), (bool)p_options["animation/trimming"], false); } -Variant EditorSceneFormatImporterUFBX::get_option_visibility(const String &p_path, bool p_for_animation, +Variant EditorSceneFormatImporterUFBX::get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) { return true; } diff --git a/modules/fbx/editor/editor_scene_importer_ufbx.h b/modules/fbx/editor/editor_scene_importer_ufbx.h index b81b8df4c19..6e3eafc1002 100644 --- a/modules/fbx/editor/editor_scene_importer_ufbx.h +++ b/modules/fbx/editor/editor_scene_importer_ufbx.h @@ -53,7 +53,7 @@ public: List *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List *r_options) override; - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) override; virtual void handle_compatibility_options(HashMap &p_import_params) const override; }; diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp index 0aab6e84b44..8e5a992bd45 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.cpp +++ b/modules/gltf/editor/editor_scene_importer_blend.cpp @@ -336,7 +336,7 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_ #endif } -Variant EditorSceneFormatImporterBlend::get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, +Variant EditorSceneFormatImporterBlend::get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) { if (p_path.get_extension().to_lower() != "blend") { return true; diff --git a/modules/gltf/editor/editor_scene_importer_blend.h b/modules/gltf/editor/editor_scene_importer_blend.h index 6adace92763..17eb9e57095 100644 --- a/modules/gltf/editor/editor_scene_importer_blend.h +++ b/modules/gltf/editor/editor_scene_importer_blend.h @@ -74,7 +74,7 @@ public: List *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List *r_options) override; - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) override; }; diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index ce7e17d361d..41e294cfc6e 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -100,7 +100,7 @@ void EditorSceneFormatImporterGLTF::handle_compatibility_options(HashMap &p_options) { return true; } diff --git a/modules/gltf/editor/editor_scene_importer_gltf.h b/modules/gltf/editor/editor_scene_importer_gltf.h index d0a9aaf05a9..e17b6f3f2e6 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.h +++ b/modules/gltf/editor/editor_scene_importer_gltf.h @@ -50,7 +50,7 @@ public: virtual void get_import_options(const String &p_path, List *r_options) override; virtual void handle_compatibility_options(HashMap &p_import_params) const override; - virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, + virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option, const HashMap &p_options) override; };