diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp index d89247b4292..af4ae3e576b 100644 --- a/editor/editor_property_name_processor.cpp +++ b/editor/editor_property_name_processor.cpp @@ -125,6 +125,7 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() { capitalize_string_remaps["dtls"] = "DTLS"; capitalize_string_remaps["etc"] = "ETC"; capitalize_string_remaps["etc2"] = "ETC2"; + capitalize_string_remaps["fbx"] = "FBX"; capitalize_string_remaps["fft"] = "FFT"; capitalize_string_remaps["fov"] = "FOV"; capitalize_string_remaps["fps"] = "FPS"; diff --git a/modules/fbx/editor_scene_importer_fbx.cpp b/modules/fbx/editor_scene_importer_fbx.cpp index d398fddaef7..9035dda9736 100644 --- a/modules/fbx/editor_scene_importer_fbx.cpp +++ b/modules/fbx/editor_scene_importer_fbx.cpp @@ -58,24 +58,8 @@ void EditorSceneImporterFBX::get_extensions(List *r_extensions) const { // register FBX as the one and only format for FBX importing - const String import_setting_string = "filesystem/import/fbx/"; - const String fbx_str = "fbx"; - Vector exts; - exts.push_back(fbx_str); - _register_project_setting_import(fbx_str, import_setting_string, exts, r_extensions, true); -} - -void EditorSceneImporterFBX::_register_project_setting_import(const String generic, - const String import_setting_string, - const Vector &exts, - List *r_extensions, - const bool p_enabled) const { - const String use_generic = "use_" + generic; - _GLOBAL_DEF(import_setting_string + use_generic, p_enabled, true); - if (ProjectSettings::get_singleton()->get(import_setting_string + use_generic)) { - for (int32_t i = 0; i < exts.size(); i++) { - r_extensions->push_back(exts[i]); - } + if (GLOBAL_GET("filesystem/import/fbx/use_fbx")) { + r_extensions->push_back("fbx"); } } @@ -1462,3 +1446,7 @@ void EditorSceneImporterFBX::BuildDocumentNodes( } } } + +EditorSceneImporterFBX::EditorSceneImporterFBX() { + _GLOBAL_DEF("filesystem/import/fbx/use_fbx", true, true); +} diff --git a/modules/fbx/editor_scene_importer_fbx.h b/modules/fbx/editor_scene_importer_fbx.h index a7af28e69ac..61ee4cadf1a 100644 --- a/modules/fbx/editor_scene_importer_fbx.h +++ b/modules/fbx/editor_scene_importer_fbx.h @@ -121,10 +121,9 @@ private: template T _interpolate_track(const Vector &p_times, const Vector &p_values, float p_time, AssetImportAnimation::Interpolation p_interp); - void _register_project_setting_import(const String generic, const String import_setting_string, const Vector &exts, List *r_extensions, const bool p_enabled) const; public: - EditorSceneImporterFBX() {} + EditorSceneImporterFBX(); ~EditorSceneImporterFBX() {} virtual void get_extensions(List *r_extensions) const;