diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 0b896a725ef..6f1a24d7e80 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -386,6 +386,10 @@ void EditorSettings::_load_defaults() { set("global/font",""); hints["global/font"]=PropertyInfo(Variant::STRING,"global/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt"); + set("global/default_project_path",""); + hints["global/default_project_path"]=PropertyInfo(Variant::STRING,"global/default_project_path",PROPERTY_HINT_GLOBAL_DIR); + set("global/default_project_export_path",""); + hints["global/default_project_export_path"]=PropertyInfo(Variant::STRING,"global/default_project_export_path",PROPERTY_HINT_GLOBAL_DIR); set("text_editor/background_color",Color::html("3b000000")); set("text_editor/text_color",Color::html("aaaaaa")); @@ -402,8 +406,8 @@ void EditorSettings::_load_defaults() { set("text_editor/create_signal_callbacks",true); set("text_editor/autosave_interval_seconds",60); set("text_editor/font",""); - set("text_editor/auto_brace_complete", false); hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt"); + set("text_editor/auto_brace_complete", false); set("3d_editor/default_fov",45.0); diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index d757a4c07d9..22331c86bf7 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -1336,6 +1336,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { file_export = memnew( FileDialog ); add_child(file_export); file_export->set_access(FileDialog::ACCESS_FILESYSTEM); + file_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") ); file_export->set_title("Export Project"); file_export->connect("file_selected", this,"_export_action"); @@ -1353,6 +1354,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { pck_export = memnew( FileDialog ); pck_export->set_access(FileDialog::ACCESS_FILESYSTEM); + pck_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") ); pck_export->set_title("Export Project PCK"); pck_export->connect("file_selected", this,"_export_action_pck"); pck_export->add_filter("*.pck ; Data Pack"); diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index cd28c6da979..26d7abb7458 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -900,6 +900,7 @@ ProjectManager::ProjectManager() { scan_dir = memnew( FileDialog ); scan_dir->set_access(FileDialog::ACCESS_FILESYSTEM); scan_dir->set_mode(FileDialog::MODE_OPEN_DIR); + scan_dir->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_path") ); add_child(scan_dir); scan_dir->connect("dir_selected",this,"_scan_begin");