Commit: d3b4ff6eaa1cb155adf4b2aad4775746bc3ca6df
Author: Campbell Barton
Date:   Mon Mar 15 13:30:26 2021 +1100
Branches: master
https://developer.blender.org/rBd3b4ff6eaa1cb155adf4b2aad4775746bc3ca6df

Cleanup: rename G_FILE_RECOVER -> G_FILE_RECOVER_READ

No functional changes, make room for a write equivalent.

===================================================================

M       source/blender/blenkernel/BKE_global.h
M       source/blender/blenkernel/intern/blendfile.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/windowmanager/intern/wm_files.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_global.h 
b/source/blender/blenkernel/BKE_global.h
index aa293e4c382..fc2ce4bf8a5 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -178,7 +178,7 @@ enum {
    * In practice this means recover needs to be passed around to too many low 
level functions,
    * so keep this as a flag.
    */
-  G_FILE_RECOVER = (1 << 23),
+  G_FILE_RECOVER_READ = (1 << 23),
   /** BMesh option to save as older mesh format */
   /* #define G_FILE_MESH_COMPAT       (1 << 26) */
   /* #define G_FILE_GLSL_NO_ENV_LIGHTING (1 << 28) */ /* deprecated */
diff --git a/source/blender/blenkernel/intern/blendfile.c 
b/source/blender/blenkernel/intern/blendfile.c
index 967eb81026c..efbf19c7381 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -140,7 +140,7 @@ static void setup_app_data(bContext *C,
 {
   Main *bmain = G_MAIN;
   Scene *curscene = NULL;
-  const bool recover = (G.fileflags & G_FILE_RECOVER) != 0;
+  const bool recover = (G.fileflags & G_FILE_RECOVER_READ) != 0;
   const bool is_startup = params->is_startup;
   enum {
     LOAD_UI = 1,
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 347ee1378a4..369c10a65b4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3770,7 +3770,7 @@ static BHead *read_global(BlendFileData *bfd, FileData 
*fd, BHead *bhead)
    * (not after loading file). */
   if (bfd->filename[0] == 0) {
     if (fd->fileversion < 265 || (fd->fileversion == 265 && fg->subversion < 
1)) {
-      if ((G.fileflags & G_FILE_RECOVER) == 0) {
+      if ((G.fileflags & G_FILE_RECOVER_READ) == 0) {
         BLI_strncpy(bfd->filename, BKE_main_blendfile_path(bfd->main), 
sizeof(bfd->filename));
       }
     }
@@ -3781,7 +3781,7 @@ static BHead *read_global(BlendFileData *bfd, FileData 
*fd, BHead *bhead)
     }
   }
 
-  if (G.fileflags & G_FILE_RECOVER) {
+  if (G.fileflags & G_FILE_RECOVER_READ) {
     BLI_strncpy(fd->relabase, fg->filename, sizeof(fd->relabase));
   }
 
diff --git a/source/blender/windowmanager/intern/wm_files.c 
b/source/blender/windowmanager/intern/wm_files.c
index 227520ed3f9..40b32665f4b 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2595,9 +2595,9 @@ bool WM_recover_last_session(bContext *C, ReportList 
*reports)
 {
   char filepath[FILE_MAX];
   BLI_join_dirfile(filepath, sizeof(filepath), BKE_tempdir_base(), 
BLENDER_QUIT_FILE);
-  G.fileflags |= G_FILE_RECOVER;
+  G.fileflags |= G_FILE_RECOVER_READ;
   const bool success = wm_file_read_opwrap(C, filepath, reports);
-  G.fileflags &= ~G_FILE_RECOVER;
+  G.fileflags &= ~G_FILE_RECOVER_READ;
   return success;
 }
 
@@ -2654,11 +2654,11 @@ static int wm_recover_auto_save_exec(bContext *C, 
wmOperator *op)
   wm_open_init_use_scripts(op, true);
   SET_FLAG_FROM_TEST(G.f, RNA_boolean_get(op->ptr, "use_scripts"), 
G_FLAG_SCRIPT_AUTOEXEC);
 
-  G.fileflags |= G_FILE_RECOVER;
+  G.fileflags |= G_FILE_RECOVER_READ;
 
   success = wm_file_read_opwrap(C, filepath, op->reports);
 
-  G.fileflags &= ~G_FILE_RECOVER;
+  G.fileflags &= ~G_FILE_RECOVER_READ;
 
   if (success) {
     if (!G.background) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to