godot/editor
Marius Hanl dda06a8209 Fix errors when renaming/moving/deleting global scripts
When renaming or moving global scripts, the following errors can appear:
- Attempt to open script 'xxx' resulted in error 'File not found'.
- Failed loading resource: xxx. Make sure resources have been imported by opening the project in the editor at least once.
- Parser Error: Class 'xxx' hides a global script class.

When deleting scripts, errors appear when opening the 'Create Node Dialog' as the script cache still contains the removed global scripts. The following errors can appear:
- Attempt to open script 'xxx' resulted in error 'File not found'.
- Failed loading resource: xxx. Make sure resources have been imported by opening the project in the editor at least once.
editor/create_dialog.cpp:241 - Condition "scr.is_null()" is true.

All this errors can be fixed by correctly handling the cases. They involves removing the old path and adding the new one (if not deleted) to the ScriptServer. This is somewhat similar if the file is moved or deleted outside Godot and detected by the file watcher, but more specialized for this particular usecase, since we know the old and the new path / correctly know what the user just did.
2024-04-05 18:52:15 +02:00
..
debugger Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
export Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
gui Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
icons Merge pull request #89711 from MewPurPur/fix-godot-logo 2024-03-24 01:22:37 +01:00
import Merge pull request #89599 from timothyqiu/vegetate 2024-03-23 21:15:39 -07:00
plugins Merge pull request #89963 from timothyqiu/auto-translation 2024-03-28 10:47:42 +01:00
project_manager Add browse folder and browse file icons 2024-03-12 09:57:59 -04:00
themes Fix main button margins in custom themes 2024-03-13 15:38:09 -04:00
translations i18n: Sync translations with Weblate 2024-03-04 16:16:19 +01:00
action_map_editor.cpp Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog 2024-03-05 00:02:09 +01:00
action_map_editor.h Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog 2024-03-05 00:02:09 +01:00
animation_bezier_editor.cpp Merge pull request #88498 from CookieBadger/animation-fix-snapping-multiple 2024-03-24 01:14:23 +01:00
animation_bezier_editor.h Merge pull request #88498 from CookieBadger/animation-fix-snapping-multiple 2024-03-24 01:14:23 +01:00
animation_track_editor.cpp Merge pull request #89599 from timothyqiu/vegetate 2024-03-23 21:15:39 -07:00
animation_track_editor.h Merge pull request #88498 from CookieBadger/animation-fix-snapping-multiple 2024-03-24 01:14:23 +01:00
animation_track_editor_plugins.cpp
animation_track_editor_plugins.h
audio_stream_preview.cpp
audio_stream_preview.h
code_editor.cpp Merge pull request #89690 from Calinou/editor-improve-native-shader-inspector 2024-03-24 01:21:42 +01:00
code_editor.h Add editor settings for autocompletion with NodePath and StringName 2024-03-19 17:23:54 +02:00
connections_dialog.cpp Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
connections_dialog.h Select method name edit when opening connection dialog 2024-03-12 00:51:50 +01:00
create_dialog.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
create_dialog.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
dependency_editor.cpp Fix wrong extension filter for dependency editor 2024-03-26 23:51:30 +08:00
dependency_editor.h
directory_create_dialog.cpp
directory_create_dialog.h
doc_tools.cpp Improve merging of docs on generation 2024-03-25 11:56:11 +01:00
doc_tools.h
editor_about.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_about.h
editor_asset_installer.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_asset_installer.h
editor_atlas_packer.cpp Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
editor_atlas_packer.h
editor_audio_buses.cpp Add editor shortcuts to toggle bottom panel visibility 2024-03-05 15:53:15 +01:00
editor_audio_buses.h
editor_autoload_settings.cpp Merge pull request #81177 from Calinou/filedialog-focus-path-shortcut 2024-03-05 09:55:36 +01:00
editor_autoload_settings.h Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog 2024-03-05 00:02:09 +01:00
editor_build_profile.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_build_profile.h
editor_builders.py Fix POT generation missing some strings when built-in ones are enabled 2024-03-12 11:21:17 -03:00
editor_command_palette.cpp Fix PopupMenu doesn't respect it's ScrollContainer's margins 2024-02-23 15:51:47 +02:00
editor_command_palette.h
editor_data.cpp fix error where update wouldn't reconnect the signal it should have reconnected and led to errors and crash 2024-03-22 01:00:33 +01:00
editor_data.h Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
editor_dock_manager.cpp Refactor and fix issues in Editor Dock Manager 2024-03-16 13:51:31 -04:00
editor_dock_manager.h Refactor and fix issues in Editor Dock Manager 2024-03-16 13:51:31 -04:00
editor_feature_profile.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_feature_profile.h
editor_file_system.cpp Fix sorting of files/dirs in dialogs 2024-03-20 13:45:47 +01:00
editor_file_system.h Fix sorting of files/dirs in dialogs 2024-03-20 13:45:47 +01:00
editor_folding.cpp
editor_folding.h
editor_help.cpp Merge pull request #89332 from Riteo/werror-never-changes 2024-03-09 22:20:19 +01:00
editor_help.h Editor Help: Add syntax highlighting for code blocks 2024-03-09 00:02:31 +03:00
editor_help_search.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_help_search.h Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
editor_inspector.cpp Merge pull request #89631 from dalexeev/editor-fix-inspector-groups-interfering 2024-03-24 01:20:02 +01:00
editor_inspector.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
editor_interface.cpp Optimise Object's get_argument_options 2024-02-29 18:00:54 +01:00
editor_interface.h Optimise Object's get_argument_options 2024-02-29 18:00:54 +01:00
editor_layouts_dialog.cpp Fix PopupMenu doesn't respect it's ScrollContainer's margins 2024-02-23 15:51:47 +02:00
editor_layouts_dialog.h
editor_locale_dialog.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_locale_dialog.h
editor_log.cpp Make the "Clear Output" shortcut not require panel focus 2024-03-15 11:40:21 +04:00
editor_log.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
editor_native_shader_source_visualizer.cpp Improve the editor native shader source visualizer 2024-03-22 00:17:32 +01:00
editor_native_shader_source_visualizer.h Improve the editor native shader source visualizer 2024-03-22 00:17:32 +01:00
editor_node.cpp Merge pull request #89447 from ajreckof/fix-error-crash-on-change-type-root-after-external-changes 2024-03-24 01:15:38 +01:00
editor_node.h Allow configuring the script filename casing rule 2024-03-05 09:43:29 +01:00
editor_paths.cpp
editor_paths.h
editor_plugin.compat.inc Add editor shortcuts to toggle bottom panel visibility 2024-03-05 15:53:15 +01:00
editor_plugin.cpp Add editor shortcuts to toggle bottom panel visibility 2024-03-05 15:53:15 +01:00
editor_plugin.h Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
editor_plugin_settings.cpp Fix toggling a plugin makes its name black 2024-02-25 18:54:27 +01:00
editor_plugin_settings.h
editor_properties.cpp Fixed undo/redo behaviour of color picker and added ability to cancel/confirm color selection. 2024-03-24 15:12:11 -05:00
editor_properties.h Fixed undo/redo behaviour of color picker and added ability to cancel/confirm color selection. 2024-03-24 15:12:11 -05:00
editor_properties_array_dict.cpp Fix update property for dictionnaries so that it updates only what is necessary 2024-03-21 19:31:46 +01:00
editor_properties_array_dict.h Fix update property for dictionnaries so that it updates only what is necessary 2024-03-21 19:31:46 +01:00
editor_properties_vector.cpp
editor_properties_vector.h
editor_property_name_processor.cpp
editor_property_name_processor.h
editor_quick_open.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_quick_open.h
editor_resource_picker.cpp Merge pull request #89599 from timothyqiu/vegetate 2024-03-23 21:15:39 -07:00
editor_resource_picker.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
editor_resource_preview.cpp Speed up inspector updates for TileMap 2024-03-07 18:01:30 +01:00
editor_resource_preview.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
editor_run.cpp
editor_run.h
editor_run_native.cpp Display a warning if device CPU architecture is not active in the export preset. 2024-02-23 01:37:32 +01:00
editor_run_native.h Display a warning if device CPU architecture is not active in the export preset. 2024-02-23 01:37:32 +01:00
editor_script.cpp
editor_script.h
editor_sectioned_inspector.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_sectioned_inspector.h
editor_settings.cpp Add editor settings for autocompletion with NodePath and StringName 2024-03-19 17:23:54 +02:00
editor_settings.h Add autocompletion for EditorSettings' methods 2024-03-01 14:58:28 +01:00
editor_settings_dialog.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
editor_settings_dialog.h
editor_string_names.cpp
editor_string_names.h
editor_translation.cpp Fix POT generation missing some strings when built-in ones are enabled 2024-03-12 11:21:17 -03:00
editor_translation.h Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
editor_translation_parser.cpp
editor_translation_parser.h
editor_undo_redo_manager.cpp
editor_undo_redo_manager.h
editor_vcs_interface.cpp Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
editor_vcs_interface.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
event_listener_line_edit.cpp
event_listener_line_edit.h
fbx_importer_manager.cpp Add browse folder and browse file icons 2024-03-12 09:57:59 -04:00
fbx_importer_manager.h
filesystem_dock.cpp Fix errors when renaming/moving/deleting global scripts 2024-04-05 18:52:15 +02:00
filesystem_dock.h Fix sorting of files/dirs in dialogs 2024-03-20 13:45:47 +01:00
find_in_files.cpp Merge pull request #88465 from AeioMuch/search_results_button 2024-03-25 11:18:35 +01:00
find_in_files.h Hide Search Results by default. Show it on first search and push it at the end. Add a close button to hide it back. Also switch to Script Editor if a searched line is clicked. 2024-03-16 20:42:05 +01:00
group_settings_editor.cpp Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
group_settings_editor.h Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog 2024-03-05 00:02:09 +01:00
groups_editor.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
groups_editor.h
history_dock.cpp Save scene and global checkbox options of History window, fixes #88432 2024-02-29 22:51:18 +00:00
history_dock.h Save scene and global checkbox options of History window, fixes #88432 2024-02-29 22:51:18 +00:00
import_defaults_editor.cpp
import_defaults_editor.h
import_dock.cpp [Import] Add "skip file" import option to skip (and exclude from export) importable formats, auto set it for the images used by bitmap font. 2024-03-12 21:34:40 +02:00
import_dock.h
input_event_configuration_dialog.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
input_event_configuration_dialog.h
inspector_dock.cpp Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
inspector_dock.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
localization_editor.cpp Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
localization_editor.h Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
multi_node_edit.cpp
multi_node_edit.h
node_dock.cpp
node_dock.h
plugin_config_dialog.cpp Update plugin_config_dialog.cpp 2024-03-11 03:14:51 -04:00
plugin_config_dialog.h
pot_generator.cpp Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
pot_generator.h
progress_dialog.cpp
progress_dialog.h
project_converter_3_to_4.cpp Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
project_converter_3_to_4.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
project_manager.cpp [macOS] Use "expand_to_title" for the project manager. 2024-03-24 00:23:16 +02:00
project_manager.h [macOS] Use "expand_to_title" for the project manager. 2024-03-24 00:23:16 +02:00
project_settings_editor.cpp Merge pull request #87870 from ryevdokimov/remove-unnecessary-focus-methods 2024-03-11 23:48:13 +01:00
project_settings_editor.h Merge pull request #87870 from ryevdokimov/remove-unnecessary-focus-methods 2024-03-11 23:48:13 +01:00
property_selector.cpp Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
property_selector.h
register_editor_types.cpp Allow configuring the script filename casing rule 2024-03-05 09:43:29 +01:00
register_editor_types.h
register_exporters.h
rename_dialog.cpp Allow to easily rename multiple nodes 2024-03-03 13:16:21 +01:00
rename_dialog.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
renames_map_3_to_4.cpp Add ufbx for FBX importing 2024-02-23 22:33:04 +01:00
renames_map_3_to_4.h
reparent_dialog.cpp
reparent_dialog.h
run_instances_dialog.cpp Improve Run Instances Dialog 2024-02-23 21:07:46 +01:00
run_instances_dialog.h
scene_create_dialog.cpp
scene_create_dialog.h
scene_tree_dock.cpp Disable auto-translation in sub-resource list menu 2024-03-26 17:47:30 +01:00
scene_tree_dock.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
script_create_dialog.cpp Fix ScriptCreateDialog to avoid selecting the file extension upon opening 2024-03-09 22:33:43 +07:00
script_create_dialog.h Allow configuring the script filename casing rule 2024-03-05 09:43:29 +01:00
SCsub Fix POT generation missing some strings when built-in ones are enabled 2024-03-12 11:21:17 -03:00
shader_create_dialog.cpp
shader_create_dialog.h
shader_globals_editor.cpp Add Enter shortcut to add a shader global in the editor 2024-03-05 19:22:52 +01:00
shader_globals_editor.h Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog 2024-03-05 00:02:09 +01:00
surface_upgrade_tool.cpp
surface_upgrade_tool.h
template_builders.py SCons: Remove run_in_subprocess dependency 2024-03-11 13:20:09 -05:00
window_wrapper.cpp Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
window_wrapper.h Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00