@@ -596,8 +596,7 @@ func _on_ExportMaterial_id_pressed(id) -> void:
596596 dialog .current_path = last_export_path
597597 else :
598598 var config_key = export_profile_config_key (profile )
599- if mm_globals .config .has_section_key ("path" , config_key ):
600- dialog .current_dir = mm_globals .config .get_value ("path" , config_key )
599+ dialog .current_dir = mm_globals .config .get_value ("path" , config_key , mm_globals .get_home_directory ())
601600 add_child (dialog )
602601 var files = await dialog .select_files ()
603602 if files .size () > 0 :
@@ -702,8 +701,7 @@ func load_project() -> void:
702701 dialog .file_mode = FileDialog .FILE_MODE_OPEN_FILES
703702 dialog .add_filter ("*.ptex;Procedural Textures File" )
704703 dialog .add_filter ("*.mmpp;Model Painting File" )
705- if mm_globals .config .has_section_key ("path" , "project" ):
706- dialog .current_dir = mm_globals .config .get_value ("path" , "project" )
704+ dialog .current_dir = mm_globals .config .get_value ("path" , "project" , mm_globals .get_home_directory ())
707705 var files = await dialog .select_files ()
708706 if files .size () > 0 :
709707 do_load_projects (files )
@@ -958,8 +956,7 @@ func edit_load_selection() -> void:
958956 dialog .access = FileDialog .ACCESS_FILESYSTEM
959957 dialog .file_mode = FileDialog .FILE_MODE_OPEN_FILE
960958 dialog .add_filter ("*.mms;Material Maker Selection" )
961- if mm_globals .config .has_section_key ("path" , "selection" ):
962- dialog .current_dir = mm_globals .config .get_value ("path" , "selection" )
959+ dialog .current_dir = mm_globals .config .get_value ("path" , "selection" , mm_globals .get_home_directory ())
963960 var files = await dialog .select_files ()
964961 if files .size () == 1 :
965962 mm_globals .config .set_value ("path" , "selection" , files [0 ].get_base_dir ())
@@ -979,8 +976,7 @@ func edit_save_selection() -> void:
979976 dialog .access = FileDialog .ACCESS_FILESYSTEM
980977 dialog .file_mode = FileDialog .FILE_MODE_SAVE_FILE
981978 dialog .add_filter ("*.mms;Material Maker Selection" )
982- if mm_globals .config .has_section_key ("path" , "selection" ):
983- dialog .current_dir = mm_globals .config .get_value ("path" , "selection" )
979+ dialog .current_dir = mm_globals .config .get_value ("path" , "selection" , mm_globals .get_home_directory ())
984980 var files = await dialog .select_files ()
985981 if files .size () == 1 :
986982 mm_globals .config .set_value ("path" , "selection" , files [0 ].get_base_dir ())
0 commit comments