diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-20 16:37:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-20 17:23:22 +0300 |
commit | 6cd3a67e36b6eb120ce4aad7267107674bc1b23c (patch) | |
tree | c6dc1237935d11c2e484a09dbf78710001ca3362 /source/blender/windowmanager | |
parent | 444934632a8d8e239bc0c6d79a638ec0943152a6 (diff) |
Workspaces: remove separate workspaces.blend config file.
This is quite confusing in the current UI, with both startup.blend and
workspaces.blend containing a list of workspaces. In practice you'd usually
want to save workspaces to both files.
The downside of having a single file may be that you then can't disable
certain workspaces by default, but we could add a setting for that.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 36 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_files.h | 1 |
3 files changed, 0 insertions, 38 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 196e6cfa5ce..65f4823464a 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1603,42 +1603,6 @@ void WM_OT_save_userpref(wmOperatorType *ot) ot->exec = wm_userpref_write_exec; } -static int wm_workspace_configuration_file_write_exec(bContext *C, wmOperator *op) -{ - Main *bmain = CTX_data_main(C); - char filepath[FILE_MAX]; - - const char *app_template = U.app_template[0] ? U.app_template : NULL; - const char * const cfgdir = BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, app_template); - if (cfgdir == NULL) { - BKE_report(op->reports, RPT_ERROR, "Unable to create workspace configuration file path"); - return OPERATOR_CANCELLED; - } - - BLI_path_join(filepath, sizeof(filepath), cfgdir, BLENDER_WORKSPACES_FILE, NULL); - printf("trying to save workspace configuration file at %s ", filepath); - - if (BKE_blendfile_workspace_config_write(bmain, filepath, op->reports) != 0) { - printf("ok\n"); - return OPERATOR_FINISHED; - } - else { - printf("fail\n"); - } - - return OPERATOR_CANCELLED; -} - -void WM_OT_save_workspace_file(wmOperatorType *ot) -{ - ot->name = "Save Workspace Configuration"; - ot->idname = "WM_OT_save_workspace_file"; - ot->description = "Save workspaces of the current file as part of the user configuration"; - - ot->invoke = WM_operator_confirm; - ot->exec = wm_workspace_configuration_file_write_exec; -} - static int wm_history_file_read_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) { ED_file_read_bookmarks(); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 299624bc50b..4f39d2131b9 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3211,7 +3211,6 @@ void wm_operatortypes_register(void) WM_operatortype_append(WM_OT_read_factory_settings); WM_operatortype_append(WM_OT_save_homefile); WM_operatortype_append(WM_OT_save_userpref); - WM_operatortype_append(WM_OT_save_workspace_file); WM_operatortype_append(WM_OT_userpref_autoexec_path_add); WM_operatortype_append(WM_OT_userpref_autoexec_path_remove); WM_operatortype_append(WM_OT_window_fullscreen_toggle); diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h index e1725156012..147ed882966 100644 --- a/source/blender/windowmanager/wm_files.h +++ b/source/blender/windowmanager/wm_files.h @@ -46,7 +46,6 @@ void WM_OT_save_homefile(struct wmOperatorType *ot); void WM_OT_userpref_autoexec_path_add(struct wmOperatorType *ot); void WM_OT_userpref_autoexec_path_remove(struct wmOperatorType *ot); void WM_OT_save_userpref(struct wmOperatorType *ot); -void WM_OT_save_workspace_file(struct wmOperatorType *ot); void WM_OT_read_history(struct wmOperatorType *ot); void WM_OT_read_homefile(struct wmOperatorType *ot); void WM_OT_read_factory_settings(struct wmOperatorType *ot); |