Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Show First 20 Lines • Show All 1,261 Lines • ▼ Show 20 Lines | static int wm_homefile_write_exec(bContext *C, wmOperator *op) | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| wmWindow *win = CTX_wm_window(C); | wmWindow *win = CTX_wm_window(C); | ||||
| char filepath[FILE_MAX]; | char filepath[FILE_MAX]; | ||||
| int fileflags; | int fileflags; | ||||
| BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_PRE); | BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_PRE); | ||||
| /* check current window and close it if temp */ | /* check current window and close it if temp */ | ||||
| if (win && win->screen->temp) | if (win && win->screen->type == SCREEN_TYPE_TEMP) | ||||
| wm_window_close(C, wm, win); | wm_window_close(C, wm, win); | ||||
| /* update keymaps in user preferences */ | /* update keymaps in user preferences */ | ||||
| WM_keyconfig_update(wm); | WM_keyconfig_update(wm); | ||||
| BLI_make_file_string("/", filepath, BKE_appdir_folder_id_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); | printf("trying to save homefile at %s ", filepath); | ||||
| ▲ Show 20 Lines • Show All 700 Lines • Show Last 20 Lines | |||||