diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/csg/icons/CSGBox.svg (renamed from modules/csg/icons/icon_c_s_g_box.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGCapsule.svg (renamed from modules/csg/icons/icon_c_s_g_capsule.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGCombiner.svg (renamed from modules/csg/icons/icon_c_s_g_combiner.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGCylinder.svg (renamed from modules/csg/icons/icon_c_s_g_cylinder.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGMesh.svg (renamed from modules/csg/icons/icon_c_s_g_mesh.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGPolygon.svg (renamed from modules/csg/icons/icon_c_s_g_polygon.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGSphere.svg (renamed from modules/csg/icons/icon_c_s_g_sphere.svg) | 0 | ||||
-rw-r--r-- | modules/csg/icons/CSGTorus.svg (renamed from modules/csg/icons/icon_c_s_g_torus.svg) | 0 | ||||
-rw-r--r-- | modules/gdnative/icons/GDNativeLibrary.svg (renamed from modules/gdnative/icons/icon_g_d_native_library.svg) | 0 | ||||
-rw-r--r-- | modules/gdnative/icons/NativeScript.svg (renamed from modules/gdnative/icons/icon_native_script.svg) | 0 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_editor_plugin.h | 2 | ||||
-rw-r--r-- | modules/gdscript/icons/GDScript.svg (renamed from modules/gdscript/icons/icon_g_d_script.svg) | 0 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.cpp | 26 | ||||
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.h | 2 | ||||
-rw-r--r-- | modules/gridmap/icons/GridMap.svg (renamed from modules/gridmap/icons/icon_grid_map.svg) | 0 | ||||
-rw-r--r-- | modules/mono/icons/CSharpScript.svg (renamed from modules/mono/icons/icon_c_sharp_script.svg) | 0 | ||||
-rw-r--r-- | modules/opensimplex/icons/NoiseTexture.svg (renamed from modules/opensimplex/icons/icon_noise_texture.svg) | 0 | ||||
-rw-r--r-- | modules/visual_script/icons/VisualScript.svg (renamed from modules/visual_script/icons/icon_visual_script.svg) | 0 |
19 files changed, 20 insertions, 16 deletions
diff --git a/modules/csg/icons/icon_c_s_g_box.svg b/modules/csg/icons/CSGBox.svg index 67e34df444..67e34df444 100644 --- a/modules/csg/icons/icon_c_s_g_box.svg +++ b/modules/csg/icons/CSGBox.svg diff --git a/modules/csg/icons/icon_c_s_g_capsule.svg b/modules/csg/icons/CSGCapsule.svg index 92a7b5a870..92a7b5a870 100644 --- a/modules/csg/icons/icon_c_s_g_capsule.svg +++ b/modules/csg/icons/CSGCapsule.svg diff --git a/modules/csg/icons/icon_c_s_g_combiner.svg b/modules/csg/icons/CSGCombiner.svg index cce2902e24..cce2902e24 100644 --- a/modules/csg/icons/icon_c_s_g_combiner.svg +++ b/modules/csg/icons/CSGCombiner.svg diff --git a/modules/csg/icons/icon_c_s_g_cylinder.svg b/modules/csg/icons/CSGCylinder.svg index 645a74c79b..645a74c79b 100644 --- a/modules/csg/icons/icon_c_s_g_cylinder.svg +++ b/modules/csg/icons/CSGCylinder.svg diff --git a/modules/csg/icons/icon_c_s_g_mesh.svg b/modules/csg/icons/CSGMesh.svg index 6e940a4aa5..6e940a4aa5 100644 --- a/modules/csg/icons/icon_c_s_g_mesh.svg +++ b/modules/csg/icons/CSGMesh.svg diff --git a/modules/csg/icons/icon_c_s_g_polygon.svg b/modules/csg/icons/CSGPolygon.svg index 71b03cb8e6..71b03cb8e6 100644 --- a/modules/csg/icons/icon_c_s_g_polygon.svg +++ b/modules/csg/icons/CSGPolygon.svg diff --git a/modules/csg/icons/icon_c_s_g_sphere.svg b/modules/csg/icons/CSGSphere.svg index f81b566993..f81b566993 100644 --- a/modules/csg/icons/icon_c_s_g_sphere.svg +++ b/modules/csg/icons/CSGSphere.svg diff --git a/modules/csg/icons/icon_c_s_g_torus.svg b/modules/csg/icons/CSGTorus.svg index 3d30aa47b2..3d30aa47b2 100644 --- a/modules/csg/icons/icon_c_s_g_torus.svg +++ b/modules/csg/icons/CSGTorus.svg diff --git a/modules/gdnative/icons/icon_g_d_native_library.svg b/modules/gdnative/icons/GDNativeLibrary.svg index b494c7af6e..b494c7af6e 100644 --- a/modules/gdnative/icons/icon_g_d_native_library.svg +++ b/modules/gdnative/icons/GDNativeLibrary.svg diff --git a/modules/gdnative/icons/icon_native_script.svg b/modules/gdnative/icons/NativeScript.svg index fb9e135627..fb9e135627 100644 --- a/modules/gdnative/icons/icon_native_script.svg +++ b/modules/gdnative/icons/NativeScript.svg diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp index 5c298ae9e4..e6ff7a7afa 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp @@ -84,13 +84,13 @@ void NavigationMeshEditor::_clear_pressed() { } } -void NavigationMeshEditor::edit(NavigationRegion *p_nav_mesh_instance) { +void NavigationMeshEditor::edit(NavigationRegion *p_nav_region) { - if (p_nav_mesh_instance == NULL || node == p_nav_mesh_instance) { + if (p_nav_region == NULL || node == p_nav_region) { return; } - node = p_nav_mesh_instance; + node = p_nav_region; } void NavigationMeshEditor::_bind_methods() { diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.h b/modules/gdnavigation/navigation_mesh_editor_plugin.h index 7c3faebf57..847ad4f63d 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.h +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.h @@ -61,7 +61,7 @@ protected: void _notification(int p_option); public: - void edit(NavigationRegion *p_nav_mesh_instance); + void edit(NavigationRegion *p_nav_region); NavigationMeshEditor(); ~NavigationMeshEditor(); }; diff --git a/modules/gdscript/icons/icon_g_d_script.svg b/modules/gdscript/icons/GDScript.svg index 953bb9ae9e..953bb9ae9e 100644 --- a/modules/gdscript/icons/icon_g_d_script.svg +++ b/modules/gdscript/icons/GDScript.svg diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 886d65d28c..205257b8f2 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -401,19 +401,23 @@ void GDScriptWorkspace::_get_owners(EditorFileSystemDirectory *efsd, String p_pa } } -Node *GDScriptWorkspace::_get_owner_node(String p_path) { - Node *owner_node = NULL; +Node *GDScriptWorkspace::_get_owner_scene_node(String p_path) { + Node *owner_scene_node = NULL; List<String> owners; _get_owners(EditorFileSystem::get_singleton()->get_filesystem(), p_path, owners); - if (owners.size() > 0) { - NodePath owner_path = owners[0]; - Ref<PackedScene> owner_res = ResourceLoader::load(owner_path); - owner_node = owner_res->instance(PackedScene::GEN_EDIT_STATE_DISABLED); + for (int i = 0; i < owners.size(); i++) { + NodePath owner_path = owners[i]; + RES owner_res = ResourceLoader::load(owner_path); + if (Object::cast_to<PackedScene>(owner_res.ptr())) { + Ref<PackedScene> owner_packed_scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*owner_res)); + owner_scene_node = owner_packed_scene->instance(); + break; + } } - return owner_node; + return owner_scene_node; } void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options) { @@ -423,11 +427,11 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S bool forced = false; if (const ExtendGDScriptParser *parser = get_parse_result(path)) { - Node *owner_node = _get_owner_node(path); + Node *owner_scene_node = _get_owner_scene_node(path); String code = parser->get_text_for_completion(p_params.position); - GDScriptLanguage::get_singleton()->complete_code(code, path, owner_node, r_options, forced, call_hint); - if (owner_node) { - memdelete(owner_node); + GDScriptLanguage::get_singleton()->complete_code(code, path, owner_scene_node, r_options, forced, call_hint); + if (owner_scene_node) { + memdelete(owner_scene_node); } } } diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index 8b46d345d9..e45b06747d 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -42,7 +42,7 @@ class GDScriptWorkspace : public Reference { private: void _get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners); - Node *_get_owner_node(String p_path); + Node *_get_owner_scene_node(String p_path); protected: static void _bind_methods(); diff --git a/modules/gridmap/icons/icon_grid_map.svg b/modules/gridmap/icons/GridMap.svg index eafe1211f2..eafe1211f2 100644 --- a/modules/gridmap/icons/icon_grid_map.svg +++ b/modules/gridmap/icons/GridMap.svg diff --git a/modules/mono/icons/icon_c_sharp_script.svg b/modules/mono/icons/CSharpScript.svg index 69664ca553..69664ca553 100644 --- a/modules/mono/icons/icon_c_sharp_script.svg +++ b/modules/mono/icons/CSharpScript.svg diff --git a/modules/opensimplex/icons/icon_noise_texture.svg b/modules/opensimplex/icons/NoiseTexture.svg index 5908c2b2d4..5908c2b2d4 100644 --- a/modules/opensimplex/icons/icon_noise_texture.svg +++ b/modules/opensimplex/icons/NoiseTexture.svg diff --git a/modules/visual_script/icons/icon_visual_script.svg b/modules/visual_script/icons/VisualScript.svg index f6475d590e..f6475d590e 100644 --- a/modules/visual_script/icons/icon_visual_script.svg +++ b/modules/visual_script/icons/VisualScript.svg |