diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 22 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index baf2d322db0..d7e0a2f228a 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -320,7 +320,7 @@ static void wm_init_userdef(bContext *C, const bool from_memory) } /* update tempdir from user preferences */ - BLI_temp_dir_init(U.tempdir); + BKE_tempdir_init(U.tempdir); BKE_userdef_state(); } @@ -569,7 +569,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c G.relbase_valid = 0; if (!from_memory) { - const char * const cfgdir = BLI_get_folder(BLENDER_USER_CONFIG, NULL); + const char * const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL); if (custom_file) { BLI_strncpy(startstr, custom_file, FILE_MAX); @@ -615,7 +615,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c if (BLI_listbase_is_empty(&wmbase)) { wm_clear_default_size(C); } - BLI_temp_dir_init(U.tempdir); + BKE_tempdir_init(U.tempdir); #ifdef WITH_PYTHON_SECURITY /* use alternative setting for security nuts @@ -728,7 +728,7 @@ void wm_read_history(void) struct RecentFile *recent; const char *line; int num; - const char * const cfgdir = BLI_get_folder(BLENDER_USER_CONFIG, NULL); + const char * const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL); if (!cfgdir) return; @@ -765,7 +765,7 @@ static void write_history(void) return; /* will be NULL in background mode */ - user_config_dir = BLI_get_folder_create(BLENDER_USER_CONFIG, NULL); + user_config_dir = BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL); if (!user_config_dir) return; @@ -1025,7 +1025,7 @@ int wm_homefile_write_exec(bContext *C, wmOperator *op) /* update keymaps in user preferences */ WM_keyconfig_update(wm); - BLI_make_file_string("/", filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE); + BLI_make_file_string("/", filepath, BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE); printf("trying to save homefile at %s ", filepath); ED_editors_flush_edits(C, false); @@ -1056,7 +1056,7 @@ int wm_userpref_write_exec(bContext *C, wmOperator *op) /* update keymaps in user preferences */ WM_keyconfig_update(wm); - BLI_make_file_string("/", filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_USERPREF_FILE); + BLI_make_file_string("/", filepath, BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL), BLENDER_USERPREF_FILE); printf("trying to save userpref at %s ", filepath); if (BKE_write_file_userdef(filepath, op->reports) == 0) { @@ -1097,14 +1097,14 @@ void wm_autosave_location(char *filepath) * BLI_make_file_string will create string that has it most likely on C:\ * through get_default_root(). * If there is no C:\tmp autosave fails. */ - if (!BLI_exists(BLI_temp_dir_base())) { - savedir = BLI_get_folder_create(BLENDER_USER_AUTOSAVE, NULL); + if (!BLI_exists(BKE_tempdir_base())) { + savedir = BKE_appdir_folder_id_create(BLENDER_USER_AUTOSAVE, NULL); BLI_make_file_string("/", filepath, savedir, path); return; } #endif - BLI_make_file_string("/", filepath, BLI_temp_dir_base(), path); + BLI_make_file_string("/", filepath, BKE_tempdir_base(), path); } void WM_autosave_init(wmWindowManager *wm) @@ -1168,7 +1168,7 @@ void wm_autosave_delete(void) if (BLI_exists(filename)) { char str[FILE_MAX]; - BLI_make_file_string("/", str, BLI_temp_dir_base(), BLENDER_QUIT_FILE); + BLI_make_file_string("/", str, BKE_tempdir_base(), BLENDER_QUIT_FILE); /* if global undo; remove tempsave, otherwise rename */ if (U.uiflag & USER_GLOBALUNDO) BLI_delete(filename, false, false); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index aa93f103991..6926251634b 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -220,7 +220,7 @@ void WM_init(bContext *C, int argc, const char **argv) /* allow a path of "", this is what happens when making a new file */ #if 0 if (G.main->name[0] == 0) - BLI_make_file_string("/", G.main->name, BLI_getDefaultDocumentFolder(), "untitled.blend"); + BLI_make_file_string("/", G.main->name, BKE_appdir_folder_default(), "untitled.blend"); #endif BLI_strncpy(G.lib, G.main->name, FILE_MAX); @@ -415,7 +415,7 @@ void WM_exit_ext(bContext *C, const bool do_python) bool has_edited; int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY); - BLI_make_file_string("/", filename, BLI_temp_dir_base(), BLENDER_QUIT_FILE); + BLI_make_file_string("/", filename, BKE_tempdir_base(), BLENDER_QUIT_FILE); has_edited = ED_editors_flush_edits(C, false); @@ -544,7 +544,7 @@ void WM_exit_ext(bContext *C, const bool do_python) } wm_autosave_delete(); - BLI_temp_dir_session_purge(); + BKE_tempdir_session_purge(); } void WM_exit(bContext *C) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 3c2850ee282..598175a1952 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1777,14 +1777,14 @@ static void wm_block_splash_refreshmenu(bContext *UNUSED(C), void *UNUSED(arg_bl static int wm_resource_check_prev(void) { - const char *res = BLI_get_folder_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, true); + const char *res = BKE_appdir_folder_id_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, true); // if (res) printf("USER: %s\n", res); #if 0 /* ignore the local folder */ if (res == NULL) { /* with a local dir, copying old files isn't useful since local dir get priority for config */ - res = BLI_get_folder_version(BLENDER_RESOURCE_PATH_LOCAL, BLENDER_VERSION, true); + res = BKE_appdir_folder_id_version(BLENDER_RESOURCE_PATH_LOCAL, BLENDER_VERSION, true); } #endif @@ -1793,7 +1793,7 @@ static int wm_resource_check_prev(void) return false; } else { - return (BLI_get_folder_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION - 1, true) != NULL); + return (BKE_appdir_folder_id_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION - 1, true) != NULL); } } @@ -2688,7 +2688,7 @@ void WM_recover_last_session(bContext *C, ReportList *reports) { char filepath[FILE_MAX]; - BLI_make_file_string("/", filepath, BLI_temp_dir_base(), BLENDER_QUIT_FILE); + BLI_make_file_string("/", filepath, BKE_tempdir_base(), BLENDER_QUIT_FILE); /* if reports==NULL, it's called directly without operator, we add a quick check here */ if (reports || BLI_exists(filepath)) { G.fileflags |= G_FILE_RECOVER; |