feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef EDITOR_NODE_H
#define EDITOR_NODE_H
#pragma once
#include "core/object/script_language.h"
#include "core/templates/safe_refcount.h"
@ -98,10 +97,7 @@ class ProgressDialog;
class ProjectExportDialog;
class ProjectSettingsEditor;
class SceneImportSettingsDialog;
class SurfaceUpgradeTool;
class SurfaceUpgradeDialog;
class UIDUpgradeTool;
class UIDUpgradeDialog;
class ProjectUpgradeTool;
struct EditorProgress {
String task;
@ -121,6 +117,7 @@ public:
SCENE_NAME_CASING_PASCAL_CASE,
SCENE_NAME_CASING_SNAKE_CASE,
SCENE_NAME_CASING_KEBAB_CASE,
SCENE_NAME_CASING_CAMEL_CASE,
};
enum ActionOnPlay {
@ -144,6 +141,7 @@ public:
FILE_SAVE_SCENE,
FILE_SAVE_AS_SCENE,
FILE_SAVE_ALL_SCENES,
FILE_MULTI_SAVE_AS_SCENE,
FILE_QUICK_OPEN,
FILE_QUICK_OPEN_SCENE,
FILE_QUICK_OPEN_SCRIPT,
@ -167,8 +165,7 @@ public:
TOOLS_ORPHAN_RESOURCES,
TOOLS_BUILD_PROFILE_MANAGER,
TOOLS_SURFACE_UPGRADE,
TOOLS_UID_UPGRADE,
TOOLS_PROJECT_UPGRADE,
TOOLS_CUSTOM,
VCS_METADATA,
@ -227,7 +224,6 @@ public:
private:
friend class EditorSceneTabs;
friend class SurfaceUpgradeTool;
enum {
MAX_INIT_CALLBACKS = 128,
@ -301,6 +297,7 @@ private:
int tab_closing_idx = 0;
List<String> tabs_to_close;
List<int> scenes_to_save_as;
int tab_closing_menu_option = -1;
bool exiting = false;
@ -351,14 +348,16 @@ private:
PopupMenu *recent_scenes = nullptr;
String _recent_scene;
List<String> previous_scenes;
List<String> prev_closed_scenes;
String defer_load_scene;
Node *_last_instantiated_scene = nullptr;
ConfirmationDialog *confirmation = nullptr;
Button *confirmation_button = nullptr;
ConfirmationDialog *save_confirmation = nullptr;
ConfirmationDialog *import_confirmation = nullptr;
ConfirmationDialog *pick_main_scene = nullptr;
ConfirmationDialog *open_project_settings = nullptr;
Button *select_current_scene_button = nullptr;
AcceptDialog *accept = nullptr;
AcceptDialog *save_accept = nullptr;
@ -387,6 +386,7 @@ private:
EditorFileDialog *file_export_lib = nullptr;
EditorFileDialog *file_script = nullptr;
EditorFileDialog *file_android_build_source = nullptr;
EditorFileDialog *file_pack_zip = nullptr;
String current_path;
MenuButton *update_spinner = nullptr;
@ -414,15 +414,15 @@ private:
Tree *disk_changed_list = nullptr;
ConfirmationDialog *disk_changed = nullptr;
ConfirmationDialog *project_data_missing = nullptr;
bool scene_distraction_free = false;
bool script_distraction_free = false;
bool changing_scene = false;
bool cmdline_export_mode = false;
bool cmdline_mode = false;
bool convert_old = false;
bool immediate_dialog_confirmed = false;
bool opening_prev = false;
bool restoring_scenes = false;
bool unsaved_cache = true;
@ -461,16 +461,8 @@ private:
HashMap<String, Ref<Texture2D>> icon_type_cache;
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;
ProjectUpgradeTool *project_upgrade_tool = nullptr;
bool run_project_upgrade_tool = false;
bool was_window_windowed_last = false;
@ -537,7 +529,6 @@ private:
void _tool_menu_option(int p_idx);
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);
@ -587,9 +578,12 @@ private:
void _project_run_started();
void _project_run_stopped();
void _update_prev_closed_scenes(const String &p_scene_path, bool p_add_scene);
void _add_to_recent_scenes(const String &p_scene);
void _update_recent_scenes();
void _open_recent_scene(int p_idx);
void _dropped_files(const Vector<String> &p_files);
void _add_dropped_files_recursive(const Vector<String> &p_files, String to_path);
@ -615,6 +609,7 @@ private:
bool _find_and_save_edited_subresources(Object *obj, HashMap<Ref<Resource>, bool> &processed, int32_t flags);
void _save_edited_subresources(Node *scene, HashMap<Ref<Resource>, bool> &processed, int32_t flags);
void _mark_unsaved_scenes();
bool _is_scene_unsaved(int p_idx);
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);
@ -623,6 +618,7 @@ private:
bool _find_scene_in_use(Node *p_node, const String &p_path) const;
void _proceed_closing_scene_tabs();
void _proceed_save_asing_scene_tabs();
bool _is_closing_editor() const;
void _restart_editor(bool p_goto_project_manager = false);
@ -662,6 +658,7 @@ private:
bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class);
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);
Ref<Texture2D> _get_editor_theme_native_menu_icon(const StringName &p_name, bool p_global_menu, bool p_dark_mode) const;
void _pick_main_scene_custom_action(const String &p_custom_action_name);
@ -678,6 +675,8 @@ private:
void _execute_upgrades();
bool _is_project_data_missing();
protected:
friend class FileSystemDock;
@ -744,7 +743,7 @@ public:
ProjectSettingsEditor *get_project_settings() { return project_settings_editor; }
void trigger_menu_option(int p_option, bool p_confirmed);
bool has_previous_scenes() const;
bool has_previous_closed_scenes() const;
void new_inherited_scene() { _menu_option_confirm(FILE_NEW_INHERITED_SCENE, false); }
@ -778,7 +777,6 @@ public:
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);
@ -797,6 +795,7 @@ public:
int new_scene();
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);
Error load_scene_or_resource(const String &p_file, bool p_ignore_broken_deps = false, bool p_change_scene_tab_if_already_open = true);
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);
@ -966,6 +965,7 @@ public:
Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin_for_type_name(const String &p_type);
bool ensure_main_scene(bool p_from_native);
bool validate_custom_directory();
};
class EditorPluginList : public Object {
@ -993,9 +993,6 @@ public:
void remove_plugin(EditorPlugin *p_plugin);
void clear();
bool is_empty();
EditorPluginList();
~EditorPluginList();
};
struct EditorProgressBG {
@ -1007,5 +1004,3 @@ struct EditorProgressBG {
}
~EditorProgressBG() { EditorNode::progress_end_task_bg(task); }
};
#endif // EDITOR_NODE_H