diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 11:43:59 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 11:43:59 +0100 |
commit | f1edd03d4caef60b8ae6ce787390c1cf19518244 (patch) | |
tree | 0e0977b13e8ba0766a7364a4cb75d6c5a1b094bb /editor | |
parent | a900383e57b982e6d16526d093db6e7a83c93405 (diff) | |
parent | be1c9d677d8bab3a14d4f966da313dd6d2dd3428 (diff) |
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_file_system.cpp | 22 | ||||
-rw-r--r-- | editor/export/editor_export_platform.cpp | 4 | ||||
-rw-r--r-- | editor/export/editor_export_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/gdextension_export_plugin.h | 4 | ||||
-rw-r--r-- | editor/project_converter_3_to_4.cpp | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 678ec04b9d..b98480b594 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -31,7 +31,7 @@ #include "editor_file_system.h" #include "core/config/project_settings.h" -#include "core/extension/native_extension_manager.h" +#include "core/extension/gdextension_manager.h" #include "core/io/file_access.h" #include "core/io/resource_importer.h" #include "core/io/resource_loader.h" @@ -2335,7 +2335,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const static void _scan_extensions_dir(EditorFileSystemDirectory *d, HashSet<String> &extensions) { int fc = d->get_file_count(); for (int i = 0; i < fc; i++) { - if (d->get_file_type(i) == SNAME("NativeExtension")) { + if (d->get_file_type(i) == SNAME("GDExtension")) { extensions.insert(d->get_file_path(i)); } } @@ -2356,19 +2356,19 @@ bool EditorFileSystem::_scan_extensions() { Vector<String> extensions_removed; for (const String &E : extensions) { - if (!NativeExtensionManager::get_singleton()->is_extension_loaded(E)) { + if (!GDExtensionManager::get_singleton()->is_extension_loaded(E)) { extensions_added.push_back(E); } } - Vector<String> loaded_extensions = NativeExtensionManager::get_singleton()->get_loaded_extensions(); + Vector<String> loaded_extensions = GDExtensionManager::get_singleton()->get_loaded_extensions(); for (int i = 0; i < loaded_extensions.size(); i++) { if (!extensions.has(loaded_extensions[i])) { extensions_removed.push_back(loaded_extensions[i]); } } - String extension_list_config_file = NativeExtension::get_extension_list_config_file(); + String extension_list_config_file = GDExtension::get_extension_list_config_file(); if (extensions.size()) { if (extensions_added.size() || extensions_removed.size()) { //extensions were added or removed Ref<FileAccess> f = FileAccess::open(extension_list_config_file, FileAccess::WRITE); @@ -2385,18 +2385,18 @@ bool EditorFileSystem::_scan_extensions() { bool needs_restart = false; for (int i = 0; i < extensions_added.size(); i++) { - NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->load_extension(extensions_added[i]); - if (st == NativeExtensionManager::LOAD_STATUS_FAILED) { + GDExtensionManager::LoadStatus st = GDExtensionManager::get_singleton()->load_extension(extensions_added[i]); + if (st == GDExtensionManager::LOAD_STATUS_FAILED) { EditorNode::get_singleton()->add_io_error("Error loading extension: " + extensions_added[i]); - } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) { + } else if (st == GDExtensionManager::LOAD_STATUS_NEEDS_RESTART) { needs_restart = true; } } for (int i = 0; i < extensions_removed.size(); i++) { - NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->unload_extension(extensions_removed[i]); - if (st == NativeExtensionManager::LOAD_STATUS_FAILED) { + GDExtensionManager::LoadStatus st = GDExtensionManager::get_singleton()->unload_extension(extensions_removed[i]); + if (st == GDExtensionManager::LOAD_STATUS_FAILED) { EditorNode::get_singleton()->add_io_error("Error removing extension: " + extensions_added[i]); - } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) { + } else if (st == GDExtensionManager::LOAD_STATUS_NEEDS_RESTART) { needs_restart = true; } } diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index c01db215da..d0dcbc3bfd 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -32,7 +32,7 @@ #include "core/config/project_settings.h" #include "core/crypto/crypto_core.h" -#include "core/extension/native_extension.h" +#include "core/extension/gdextension.h" #include "core/io/file_access_encrypted.h" #include "core/io/file_access_pack.h" // PACK_HEADER_MAGIC, PACK_FORMAT_VERSION #include "core/io/zip_io.h" @@ -1267,7 +1267,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & } } - String extension_list_config_file = NativeExtension::get_extension_list_config_file(); + String extension_list_config_file = GDExtension::get_extension_list_config_file(); if (FileAccess::exists(extension_list_config_file)) { Vector<uint8_t> array = FileAccess::get_file_as_bytes(extension_list_config_file); err = p_func(p_udata, extension_list_config_file, array, idx, total, enc_in_filters, enc_ex_filters, key); diff --git a/editor/export/editor_export_plugin.h b/editor/export/editor_export_plugin.h index 3f37ed40be..88eeaf821d 100644 --- a/editor/export/editor_export_plugin.h +++ b/editor/export/editor_export_plugin.h @@ -31,7 +31,7 @@ #ifndef EDITOR_EXPORT_PLUGIN_H #define EDITOR_EXPORT_PLUGIN_H -#include "core/extension/native_extension.h" +#include "core/extension/gdextension.h" #include "editor_export_preset.h" #include "editor_export_shared_object.h" #include "scene/main/node.h" diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h index 586cd2bd59..41edf9ac75 100644 --- a/editor/plugins/gdextension_export_plugin.h +++ b/editor/plugins/gdextension_export_plugin.h @@ -40,7 +40,7 @@ protected: }; void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) { - if (p_type != "NativeExtension") { + if (p_type != "GDExtension") { return; } @@ -55,7 +55,7 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p String entry_symbol = config->get_value("configuration", "entry_symbol"); PackedStringArray tags; - String library_path = NativeExtension::find_extension_library( + String library_path = GDExtension::find_extension_library( p_path, config, [p_features](String p_feature) { return p_features.has(p_feature); }, &tags); if (!library_path.is_empty()) { add_shared_object(library_path, tags); diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index d42dc3c3bf..e07c672f5c 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -1398,7 +1398,7 @@ static const char *class_renames[][2] = { // { "Physics2DDirectBodyStateSW", "GodotPhysicsDirectBodyState2D" }, // Class is not visible in ClassDB // { "Physics2DShapeQueryResult", "PhysicsShapeQueryResult2D" }, // Class is not visible in ClassDB // { "PhysicsShapeQueryResult", "PhysicsShapeQueryResult3D" }, // Class is not visible in ClassDB - // { "NativeScript","NativeExtension"}, ?? + // { "NativeScript","GDExtension"}, ?? { "ARVRAnchor", "XRAnchor3D" }, { "ARVRCamera", "XRCamera3D" }, { "ARVRController", "XRController3D" }, |