feat: updated engine version to 4.4-rc1

This commit is contained in:
Sara 2025-02-23 14:38:14 +01:00
parent ee00efde1f
commit 21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions

View file

@ -42,27 +42,17 @@ typedef void (*EditorPluginInitializeCallback)();
typedef bool (*EditorBuildCallback)();
class AcceptDialog;
class CenterContainer;
class CheckBox;
class ColorPicker;
class ConfirmationDialog;
class Control;
class FileDialog;
class HBoxContainer;
class HSplitContainer;
class LinkButton;
class MenuBar;
class MenuButton;
class Node2D;
class OptionButton;
class Panel;
class PanelContainer;
class PopupPanel;
class RichTextLabel;
class SubViewport;
class TabBar;
class TabContainer;
class TextureRect;
class TextureProgressBar;
class Tree;
class VBoxContainer;
@ -83,56 +73,49 @@ class EditorCommandPalette;
class EditorDockManager;
class EditorExport;
class EditorExportPreset;
class EditorExtensionManager;
class EditorFeatureProfileManager;
class EditorFileDialog;
class EditorFolding;
class EditorInspector;
class EditorLayoutsDialog;
class EditorLog;
class EditorMainScreen;
class EditorNativeShaderSourceVisualizer;
class EditorPluginList;
class EditorQuickOpen;
class EditorPropertyResource;
class EditorResourcePreview;
class EditorResourceConversionPlugin;
class EditorRunBar;
class EditorRunNative;
class EditorSceneTabs;
class EditorSelectionHistory;
class EditorSettingsDialog;
class EditorTitleBar;
class EditorToaster;
class EditorUndoRedoManager;
class ExportTemplateManager;
class EditorQuickOpenDialog;
class FBXImporterManager;
class FileSystemDock;
class HistoryDock;
class ImportDock;
class NodeDock;
class OrphanResourcesDialog;
class PluginConfigDialog;
class ProgressDialog;
class ProjectExportDialog;
class ProjectSettingsEditor;
class RunSettingsDialog;
class SceneImportSettingsDialog;
class ScriptCreateDialog;
class SurfaceUpgradeTool;
class SurfaceUpgradeDialog;
class WindowWrapper;
class UIDUpgradeTool;
class UIDUpgradeDialog;
struct EditorProgress {
String task;
bool force_background = false;
bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true);
EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false, bool p_force_background = false);
~EditorProgress();
};
class EditorNode : public Node {
GDCLASS(EditorNode, Node);
public:
enum EditorTable {
EDITOR_2D = 0,
EDITOR_3D,
EDITOR_SCRIPT,
EDITOR_ASSETLIB
};
enum SceneNameCasing {
SCENE_NAME_CASING_AUTO,
SCENE_NAME_CASING_PASCAL_CASE,
@ -151,6 +134,87 @@ public:
ACTION_ON_STOP_CLOSE_BUTTOM_PANEL,
};
enum MenuOptions {
// Scene menu.
FILE_NEW_SCENE,
FILE_NEW_INHERITED_SCENE,
FILE_OPEN_SCENE,
FILE_OPEN_PREV,
FILE_OPEN_RECENT,
FILE_SAVE_SCENE,
FILE_SAVE_AS_SCENE,
FILE_SAVE_ALL_SCENES,
FILE_QUICK_OPEN,
FILE_QUICK_OPEN_SCENE,
FILE_QUICK_OPEN_SCRIPT,
FILE_UNDO,
FILE_REDO,
FILE_RELOAD_SAVED_SCENE,
FILE_CLOSE,
FILE_QUIT,
FILE_EXPORT_MESH_LIBRARY,
// Project menu.
PROJECT_OPEN_SETTINGS,
PROJECT_VERSION_CONTROL,
PROJECT_EXPORT,
PROJECT_PACK_AS_ZIP,
PROJECT_INSTALL_ANDROID_SOURCE,
PROJECT_OPEN_USER_DATA_FOLDER,
PROJECT_RELOAD_CURRENT_PROJECT,
PROJECT_QUIT_TO_PROJECT_MANAGER,
TOOLS_ORPHAN_RESOURCES,
TOOLS_BUILD_PROFILE_MANAGER,
TOOLS_SURFACE_UPGRADE,
TOOLS_UID_UPGRADE,
TOOLS_CUSTOM,
VCS_METADATA,
VCS_SETTINGS,
// Editor menu.
EDITOR_OPEN_SETTINGS,
EDITOR_COMMAND_PALETTE,
EDITOR_TAKE_SCREENSHOT,
EDITOR_TOGGLE_FULLSCREEN,
EDITOR_OPEN_DATA_FOLDER,
EDITOR_OPEN_CONFIG_FOLDER,
EDITOR_MANAGE_FEATURE_PROFILES,
EDITOR_MANAGE_EXPORT_TEMPLATES,
EDITOR_CONFIGURE_FBX_IMPORTER,
LAYOUT_SAVE,
LAYOUT_DELETE,
LAYOUT_DEFAULT,
// Help menu.
HELP_SEARCH,
HELP_DOCS,
HELP_FORUM,
HELP_COMMUNITY,
HELP_COPY_SYSTEM_INFO,
HELP_REPORT_A_BUG,
HELP_SUGGEST_A_FEATURE,
HELP_SEND_DOCS_FEEDBACK,
HELP_ABOUT,
HELP_SUPPORT_GODOT_DEVELOPMENT,
// Update spinner menu.
SPINNER_UPDATE_CONTINUOUSLY,
SPINNER_UPDATE_WHEN_CHANGED,
SPINNER_UPDATE_SPINNER_HIDE,
// Non-menu options.
SCENE_TAB_CLOSE,
FILE_SAVE_AND_RUN,
FILE_SAVE_AND_RUN_MAIN_SCENE,
RESOURCE_SAVE,
RESOURCE_SAVE_AS,
SETTINGS_PICK_MAIN_SCENE,
};
struct ExecuteThreadArgs {
String path;
List<String> args;
@ -165,98 +229,9 @@ private:
friend class EditorSceneTabs;
friend class SurfaceUpgradeTool;
enum MenuOptions {
FILE_NEW_SCENE,
FILE_NEW_INHERITED_SCENE,
FILE_OPEN_SCENE,
FILE_SAVE_SCENE,
FILE_SAVE_SCENE_SILENTLY,
FILE_SAVE_AS_SCENE,
FILE_SAVE_ALL_SCENES,
FILE_SAVE_AND_RUN,
FILE_SAVE_AND_RUN_MAIN_SCENE,
FILE_RUN_SCENE,
FILE_SHOW_IN_FILESYSTEM,
FILE_EXPORT_PROJECT,
FILE_EXPORT_MESH_LIBRARY,
FILE_INSTALL_ANDROID_SOURCE,
FILE_EXPLORE_ANDROID_BUILD_TEMPLATES,
FILE_SAVE_OPTIMIZED,
FILE_OPEN_RECENT,
FILE_OPEN_OLD_SCENE,
FILE_QUICK_OPEN,
FILE_QUICK_OPEN_SCENE,
FILE_QUICK_OPEN_SCRIPT,
FILE_OPEN_PREV,
FILE_CLOSE,
FILE_CLOSE_OTHERS,
FILE_CLOSE_RIGHT,
FILE_CLOSE_ALL,
FILE_QUIT,
FILE_EXTERNAL_OPEN_SCENE,
EDIT_UNDO,
EDIT_REDO,
EDIT_RELOAD_SAVED_SCENE,
TOOLS_ORPHAN_RESOURCES,
TOOLS_BUILD_PROFILE_MANAGER,
TOOLS_SURFACE_UPGRADE,
TOOLS_CUSTOM,
RESOURCE_SAVE,
RESOURCE_SAVE_AS,
RUN_SETTINGS,
RUN_USER_DATA_FOLDER,
RELOAD_CURRENT_PROJECT,
RUN_PROJECT_MANAGER,
VCS_MENU,
RUN_VCS_METADATA,
RUN_VCS_SETTINGS,
SETTINGS_UPDATE_CONTINUOUSLY,
SETTINGS_UPDATE_WHEN_CHANGED,
SETTINGS_UPDATE_ALWAYS,
SETTINGS_UPDATE_CHANGES,
SETTINGS_UPDATE_SPINNER_HIDE,
SETTINGS_PREFERENCES,
SETTINGS_LAYOUT_SAVE,
SETTINGS_LAYOUT_DELETE,
SETTINGS_LAYOUT_DEFAULT,
SETTINGS_EDITOR_DATA_FOLDER,
SETTINGS_EDITOR_CONFIG_FOLDER,
SETTINGS_MANAGE_EXPORT_TEMPLATES,
SETTINGS_MANAGE_FBX_IMPORTER,
SETTINGS_MANAGE_FEATURE_PROFILES,
SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE,
SETTINGS_PICK_MAIN_SCENE,
SETTINGS_TOGGLE_FULLSCREEN,
SETTINGS_HELP,
SCENE_TAB_CLOSE,
EDITOR_SCREENSHOT,
EDITOR_OPEN_SCREENSHOT,
HELP_SEARCH,
HELP_COMMAND_PALETTE,
HELP_DOCS,
HELP_FORUM,
HELP_REPORT_A_BUG,
HELP_COPY_SYSTEM_INFO,
HELP_SUGGEST_A_FEATURE,
HELP_SEND_DOCS_FEEDBACK,
HELP_COMMUNITY,
HELP_ABOUT,
HELP_SUPPORT_GODOT_DEVELOPMENT,
SET_RENDERER_NAME_SAVE_AND_RESTART,
IMPORT_PLUGIN_BASE = 100,
TOOL_MENU_BASE = 1000
};
enum {
MAX_INIT_CALLBACKS = 128,
MAX_BUILD_CALLBACKS = 128
MAX_BUILD_CALLBACKS = 128,
};
struct ExportDefer {
@ -265,6 +240,8 @@ private:
bool debug = false;
bool pack_only = false;
bool android_build_template = false;
bool patch = false;
Vector<String> patches;
} export_defer;
static EditorNode *singleton;
@ -274,14 +251,14 @@ private:
EditorSelectionHistory editor_history;
EditorCommandPalette *command_palette = nullptr;
EditorQuickOpenDialog *quick_open_dialog = nullptr;
EditorExport *editor_export = nullptr;
EditorLog *log = nullptr;
EditorNativeShaderSourceVisualizer *native_shader_source_visualizer = nullptr;
EditorPlugin *editor_plugin_screen = nullptr;
EditorPluginList *editor_plugins_force_input_forwarding = nullptr;
EditorPluginList *editor_plugins_force_over = nullptr;
EditorPluginList *editor_plugins_over = nullptr;
EditorQuickOpen *quick_open = nullptr;
EditorQuickOpenDialog *quick_open_color_palette = nullptr;
EditorResourcePreview *resource_preview = nullptr;
EditorSelection *editor_selection = nullptr;
EditorSettingsDialog *editor_settings_dialog = nullptr;
@ -299,7 +276,6 @@ private:
HashMap<ObjectID, HashSet<EditorPlugin *>> active_plugins;
bool is_main_screen_editing = false;
PanelContainer *scene_root_parent = nullptr;
Control *gui_base = nullptr;
VBoxContainer *main_vbox = nullptr;
OptionButton *renderer = nullptr;
@ -340,7 +316,6 @@ private:
Control *right_menu_spacer = nullptr;
EditorTitleBar *title_bar = nullptr;
EditorRunBar *project_run_bar = nullptr;
VBoxContainer *main_screen_vbox = nullptr;
MenuBar *main_menu = nullptr;
PopupMenu *apple_menu = nullptr;
PopupMenu *file_menu = nullptr;
@ -360,6 +335,7 @@ private:
RichTextLabel *load_errors = nullptr;
AcceptDialog *load_error_dialog = nullptr;
bool load_errors_queued_to_display = false;
RichTextLabel *execute_outputs = nullptr;
AcceptDialog *execute_output_dialog = nullptr;
@ -414,9 +390,7 @@ private:
String current_path;
MenuButton *update_spinner = nullptr;
HBoxContainer *main_editor_button_hb = nullptr;
Vector<Button *> main_editor_buttons;
Vector<EditorPlugin *> editor_table;
EditorMainScreen *editor_main_screen = nullptr;
AudioStreamPreviewGenerator *audio_preview_gen = nullptr;
ProgressDialog *progress_dialog = nullptr;
@ -434,6 +408,7 @@ private:
Timer *editor_layout_save_delay_timer = nullptr;
Timer *scan_changes_timer = nullptr;
Button *distraction_free = nullptr;
Callable palette_file_selected_callback;
EditorBottomPanel *bottom_panel = nullptr;
@ -453,6 +428,7 @@ private:
bool requested_first_scan = false;
bool waiting_for_first_scan = true;
bool load_editor_layout_done = false;
int current_menu_option = 0;
@ -466,10 +442,8 @@ private:
uint64_t update_spinner_step_frame = 0;
int update_spinner_step = 0;
String _tmp_import_path;
String external_file;
String open_navigate;
String saving_scene;
EditorProgress *save_scene_progress = nullptr;
DynamicFontImportSettingsDialog *fontdata_import_settings = nullptr;
SceneImportSettingsDialog *scene_import_settings = nullptr;
@ -478,6 +452,7 @@ private:
String import_reload_fn;
HashSet<String> textfile_extensions;
HashSet<String> other_file_extensions;
HashSet<FileDialog *> file_dialogs;
HashSet<EditorFileDialog *> editor_file_dialogs;
@ -488,8 +463,19 @@ private:
SurfaceUpgradeTool *surface_upgrade_tool = nullptr;
SurfaceUpgradeDialog *surface_upgrade_dialog = nullptr;
bool run_surface_upgrade_tool = false;
UIDUpgradeTool *uid_upgrade_tool = nullptr;
UIDUpgradeDialog *uid_upgrade_dialog = nullptr;
bool run_uid_upgrade_tool = false;
bool should_prompt_uid_upgrade_tool = false;
bool was_window_windowed_last = false;
bool unfocused_low_processor_usage_mode_enabled = true;
static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS];
static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS];
static int build_callback_count;
@ -539,6 +525,8 @@ private:
void _android_build_source_selected(const String &p_file);
void _android_export_preset_selected(int p_index);
void _android_install_build_template();
void _android_explore_build_templates();
void _request_screenshot();
void _screenshot(bool p_use_utc = false);
@ -550,6 +538,7 @@ private:
void _export_as_menu_option(int p_idx);
void _update_file_menu_opened();
void _update_file_menu_closed();
void _palette_quick_open_dialog();
void _remove_plugin_from_enabled(const String &p_name);
void _plugin_over_edit(EditorPlugin *p_plugin, Object *p_object);
@ -559,10 +548,9 @@ private:
void _resources_reimporting(const Vector<String> &p_resources);
void _resources_reimported(const Vector<String> &p_resources);
void _sources_changed(bool p_exist);
void _remove_lock_file();
void _node_renamed();
void _editor_select_next();
void _editor_select_prev();
void _save_editor_states(const String &p_file, int p_idx = -1);
void _load_editor_plugin_states_from_config(const Ref<ConfigFile> &p_config_file);
void _update_title();
@ -571,10 +559,12 @@ private:
void _show_messages();
void _vp_resized();
void _titlebar_resized();
void _viewport_resized();
void _update_undo_redo_allowed();
int _save_external_resources(bool p_also_save_external_data = false);
void _save_scene_silently();
void _set_current_scene(int p_idx);
void _set_current_scene_nocheck(int p_idx);
@ -586,10 +576,12 @@ private:
void _scene_tab_closed(int p_tab);
void _cancel_close_scene_tab();
void _prepare_save_confirmation_popup();
void _inherit_request(String p_file);
void _instantiate_request(const Vector<String> &p_files);
void _quick_opened();
void _quick_opened(const String &p_file_path);
void _open_command_palette();
void _project_run_started();
@ -608,9 +600,11 @@ private:
void _renderer_selected(int);
void _update_renderer_color();
void _add_renderer_entry(const String &p_renderer_name, bool p_mark_overridden);
void _set_renderer_name_save_and_restart();
void _exit_editor(int p_exit_code);
virtual void input(const Ref<InputEvent> &p_event) override;
virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
bool has_main_screen() const { return true; }
@ -624,23 +618,25 @@ private:
void _find_node_types(Node *p_node, int &count_2d, int &count_3d);
void _save_scene_with_preview(String p_file, int p_idx = -1);
void _close_save_scene_progress();
bool _find_scene_in_use(Node *p_node, const String &p_path) const;
void _proceed_closing_scene_tabs();
bool _is_closing_editor() const;
void _restart_editor(bool p_goto_project_manager = false);
Dictionary _get_main_scene_state();
void _set_main_scene_state(Dictionary p_state, Node *p_for_scene);
int _get_current_main_editor();
void _save_editor_layout();
void _load_editor_layout();
void _save_central_editor_layout_to_config(Ref<ConfigFile> p_config_file);
void _load_central_editor_layout_from_config(Ref<ConfigFile> p_config_file);
void _save_window_settings_to_config(Ref<ConfigFile> p_layout, const String &p_section);
void _save_open_scenes_to_config(Ref<ConfigFile> p_layout);
void _load_open_scenes_from_config(Ref<ConfigFile> p_layout);
@ -665,12 +661,11 @@ private:
void _feature_profile_changed();
bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class);
Ref<Texture2D> _get_class_or_script_icon(const String &p_class, const Ref<Script> &p_script, const String &p_fallback = "Object", bool p_fallback_script_to_theme = false);
Ref<Texture2D> _get_class_or_script_icon(const String &p_class, const String &p_script_path, const String &p_fallback = "Object", bool p_fallback_script_to_theme = false);
void _pick_main_scene_custom_action(const String &p_custom_action_name);
void _immediate_dialog_confirmed();
void _select_default_main_screen_plugin();
void _begin_first_scan();
@ -678,6 +673,11 @@ private:
void _remove_all_not_owned_children(Node *p_node, Node *p_owner);
void _progress_dialog_visibility_changed();
void _load_error_dialog_visibility_changed();
void _execute_upgrades();
protected:
friend class FileSystemDock;
@ -689,9 +689,6 @@ public:
void init_plugins();
void _on_plugin_ready(Object *p_script, const String &p_activate_name);
void editor_select(int p_which);
void set_visible_editor(EditorTable p_table) { editor_select(p_table); }
bool call_build();
// This is a very naive estimation, but we need something now. Will be reworked later.
@ -706,6 +703,7 @@ public:
static EditorTitleBar *get_title_bar() { return singleton->title_bar; }
static VSplitContainer *get_top_split() { return singleton->top_split; }
static EditorBottomPanel *get_bottom_panel() { return singleton->bottom_panel; }
static EditorMainScreen *get_editor_main_screen() { return singleton->editor_main_screen; }
static String adjust_scene_name_casing(const String &p_root_name);
static String adjust_script_name_casing(const String &p_file_name, ScriptLanguage::ScriptNameCasing p_auto_casing);
@ -737,7 +735,6 @@ public:
static void cleanup();
EditorPlugin *get_editor_plugin_screen() { return editor_plugin_screen; }
EditorPluginList *get_editor_plugins_force_input_forwarding() { return editor_plugins_force_input_forwarding; }
EditorPluginList *get_editor_plugins_force_over() { return editor_plugins_force_over; }
EditorPluginList *get_editor_plugins_over() { return editor_plugins_over; }
@ -751,6 +748,7 @@ public:
void new_inherited_scene() { _menu_option_confirm(FILE_NEW_INHERITED_SCENE, false); }
void update_distraction_free_mode();
void set_distraction_free_mode(bool p_enter);
bool is_distraction_free_mode_enabled() const;
@ -773,9 +771,14 @@ public:
void push_node_item(Node *p_node);
void hide_unused_editors(const Object *p_editing_owner = nullptr);
void select_editor_by_name(const String &p_name);
void open_request(const String &p_path);
void replace_resources_in_object(
Object *p_object,
const Vector<Ref<Resource>> &p_source_resources,
const Vector<Ref<Resource>> &p_target_resource);
void replace_resources_in_scenes(
const Vector<Ref<Resource>> &p_source_resources,
const Vector<Ref<Resource>> &p_target_resource);
void open_request(const String &p_path, bool p_set_inherited = false);
void edit_foreign_resource(Ref<Resource> p_resource);
bool is_resource_read_only(Ref<Resource> p_resource, bool p_foreign_resources_are_writable = false);
@ -784,7 +787,6 @@ public:
bool is_changing_scene() const;
VBoxContainer *get_main_screen_control();
SubViewport *get_scene_root() { return scene_root; } // Root of the scene being edited.
void set_edited_scene(Node *p_scene);
@ -793,15 +795,17 @@ public:
void fix_dependencies(const String &p_for_file);
int new_scene();
Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_clear_errors = true, bool p_force_open_imported = false, bool p_silent_change_tab = false);
Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_force_open_imported = false, bool p_silent_change_tab = false);
Error load_resource(const String &p_resource, bool p_ignore_broken_deps = false);
HashMap<StringName, Variant> get_modified_properties_for_node(Node *p_node, bool p_node_references_only);
HashMap<StringName, Variant> get_modified_properties_reference_to_nodes(Node *p_node, List<Node *> &p_nodes_referenced_by);
void set_unfocused_low_processor_usage_mode_enabled(bool p_enabled);
struct AdditiveNodeEntry {
Node *node = nullptr;
NodePath parent = NodePath();
NodePath parent;
Node *owner = nullptr;
int index = 0;
// Used if the original parent node is lost
@ -834,10 +838,19 @@ public:
HashMap<NodePath, ModificationNodeEntry> other_instances_modifications;
};
struct SceneEditorDataEntry {
bool is_editable = false;
bool is_display_folded = false;
};
HashMap<int, SceneModificationsEntry> scenes_modification_table;
List<String> scenes_reimported;
List<String> resources_reimported;
void update_node_from_node_modification_entry(Node *p_node, ModificationNodeEntry &p_node_modification);
void get_scene_editor_data_for_node(Node *p_root, Node *p_node, HashMap<NodePath, SceneEditorDataEntry> &p_table);
void get_preload_scene_modification_table(
Node *p_edited_scene,
Node *p_reimported_root,
@ -846,7 +859,7 @@ public:
void get_preload_modifications_reference_to_nodes(
Node *p_root,
Node *p_node,
List<Node *> &p_excluded_nodes,
HashSet<Node *> &p_excluded_nodes,
List<Node *> &p_instance_list_with_children,
HashMap<NodePath, ModificationNodeEntry> &p_modification_table);
void get_children_nodes(Node *p_node, List<Node *> &p_nodes);
@ -885,7 +898,7 @@ public:
void _copy_warning(const String &p_str);
Error export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only, bool p_android_build_template);
Error export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only, bool p_android_build_template, bool p_patch, const Vector<String> &p_patches);
bool is_project_exporting() const;
Control *get_gui_base() { return gui_base; }
@ -907,7 +920,7 @@ public:
void reload_scene(const String &p_path);
void find_all_instances_inheriting_path_in_node(Node *p_root, Node *p_node, const String &p_instance_path, List<Node *> &p_instance_list);
void find_all_instances_inheriting_path_in_node(Node *p_root, Node *p_node, const String &p_instance_path, HashSet<Node *> &p_instance_list);
void preload_reimporting_with_path_in_edited_scenes(const List<String> &p_scenes);
void reload_instances_with_path_in_edited_scenes();
@ -916,6 +929,8 @@ public:
Dictionary drag_resource(const Ref<Resource> &p_res, Control *p_from);
Dictionary drag_files_and_dirs(const Vector<String> &p_paths, Control *p_from);
EditorQuickOpenDialog *get_quick_open_dialog() { return quick_open_dialog; }
void add_tool_menu_item(const String &p_name, const Callable &p_callback);
void add_tool_submenu_item(const String &p_name, PopupMenu *p_submenu);
void remove_tool_menu_item(const String &p_name);
@ -927,13 +942,13 @@ public:
void save_scene_list(const HashSet<String> &p_scene_paths);
void save_before_run();
void try_autosave();
void restart_editor();
void restart_editor(bool p_goto_project_manager = false);
void unload_editor_addons();
void dim_editor(bool p_dimming);
bool is_editor_dimmed() const;
void edit_current() { _edit_current(); };
void edit_current() { _edit_current(); }
bool has_scenes_in_session();
@ -947,38 +962,12 @@ public:
void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin(const Ref<Resource> &p_for_resource);
Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin_for_resource(const Ref<Resource> &p_for_resource);
Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin_for_type_name(const String &p_type);
bool ensure_main_scene(bool p_from_native);
};
struct EditorProgress {
String task;
bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) {
if (Thread::is_main_thread()) {
return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh);
} else {
EditorNode::progress_task_step_bg(task, p_step);
return false;
}
}
EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) {
if (Thread::is_main_thread()) {
EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
} else {
EditorNode::progress_add_task_bg(p_task, p_label, p_amount);
}
task = p_task;
}
~EditorProgress() {
if (Thread::is_main_thread()) {
EditorNode::progress_end_task(task);
} else {
EditorNode::progress_end_task_bg(task);
}
}
};
class EditorPluginList : public Object {
private:
Vector<EditorPlugin *> plugins_list;