Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index b99246dc34b..7bbf78ef089 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -388,8 +388,9 @@ void WM_file_autoexec_init(const char *filepath)
}
}
-void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
+bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
{
+ bool success = false;
int retval;
/* so we can get the error message */
@@ -412,7 +413,7 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
ListBase wmbase;
/* assume automated tasks with background, don't write recent file list */
- const int do_history = (G.background == FALSE) && (CTX_wm_manager(C)->op_undo_depth == 0);
+ const bool do_history = (G.background == FALSE) && (CTX_wm_manager(C)->op_undo_depth == 0);
/* put aside screens to match with persistent windows later */
/* also exit screens and editors */
@@ -496,6 +497,8 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
BKE_reset_undo();
BKE_write_undo(C, "original"); /* save current state */
+
+ success = true;
}
else if (retval == BKE_READ_EXOTIC_OK_OTHER)
BKE_write_undo(C, "Import file");
@@ -516,6 +519,8 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
WM_cursor_wait(0);
+ return success;
+
}