[Bf-blender-cvs] [cdf2dbe] master: Cleanup: deprecate some G.fileflags comment others

Campbell Barton noreply at git.blender.org
Mon Jul 27 03:00:32 CEST 2015


Commit: cdf2dbeb1fa28a91c5fea6b5b4de95f644dc970f
Author: Campbell Barton
Date:   Mon Jul 27 10:36:11 2015 +1000
Branches: master
https://developer.blender.org/rBcdf2dbeb1fa28a91c5fea6b5b4de95f644dc970f

Cleanup: deprecate some G.fileflags comment others

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

M	source/blender/blenkernel/BKE_global.h
M	source/blender/windowmanager/intern/wm_files.c
M	source/blender/windowmanager/intern/wm_init_exit.c

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

diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 8a3ffc6..865f621 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -140,14 +140,19 @@ enum {
 #define G_AUTOPACK               (1 << 0)
 #define G_FILE_COMPRESS          (1 << 1)
 #define G_FILE_AUTOPLAY          (1 << 2)
+
+#ifdef DNA_DEPRECATED_ALLOW
 #define G_FILE_ENABLE_ALL_FRAMES (1 << 3)               /* deprecated */
 #define G_FILE_SHOW_DEBUG_PROPS  (1 << 4)               /* deprecated */
 #define G_FILE_SHOW_FRAMERATE    (1 << 5)               /* deprecated */
 /* #define G_FILE_SHOW_PROFILE   (1 << 6) */            /* deprecated */
-#define G_FILE_LOCK              (1 << 7)
-#define G_FILE_SIGN              (1 << 8)
+/* #define G_FILE_LOCK           (1 << 7) */            /* deprecated */
+/* #define G_FILE_SIGN           (1 << 8) */            /* deprecated */
+#endif  /* DNA_DEPRECATED_ALLOW */
+
 #define G_FILE_USERPREFS         (1 << 9)
 #define G_FILE_NO_UI             (1 << 10)
+#ifdef DNA_DEPRECATED_ALLOW
 /* #define G_FILE_GAME_TO_IPO    (1 << 11) */           /* deprecated */
 #define G_FILE_GAME_MAT          (1 << 12)              /* deprecated */
 /* #define G_FILE_DISPLAY_LISTS  (1 << 13) */           /* deprecated */
@@ -160,11 +165,19 @@ enum {
 #define G_FILE_GLSL_NO_NODES     (1 << 20)              /* deprecated */
 #define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21)              /* deprecated */
 #define G_FILE_IGNORE_DEPRECATION_WARNINGS  (1 << 22)   /* deprecated */
+#endif  /* DNA_DEPRECATED_ALLOW */
+
+/* On read, use #FileGlobal.filename instead of the real location on-disk,
+ * needed for recovering temp files so relative paths resolve */
 #define G_FILE_RECOVER           (1 << 23)
+/* On write, remap relative file paths to the new file location. */
 #define G_FILE_RELATIVE_REMAP    (1 << 24)
+/* On write, make backup `.blend1`, `.blend2` ... files, when the users preference is enabled */
 #define G_FILE_HISTORY           (1 << 25)
-#define G_FILE_MESH_COMPAT       (1 << 26)              /* BMesh option to save as older mesh format */
-#define G_FILE_SAVE_COPY         (1 << 27)              /* restore paths after editing them */
+/* BMesh option to save as older mesh format */
+#define G_FILE_MESH_COMPAT       (1 << 26)
+/* On wrote, restore paths after editing them (G_FILE_RELATIVE_REMAP) */
+#define G_FILE_SAVE_COPY         (1 << 27)
 
 #define G_FILE_FLAGS_RUNTIME (G_FILE_NO_UI | G_FILE_RELATIVE_REMAP | G_FILE_MESH_COMPAT | G_FILE_SAVE_COPY)
 
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 8c5f86f..74be3bc 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1036,7 +1036,7 @@ int wm_homefile_write_exec(bContext *C, wmOperator *op)
 	ED_editors_flush_edits(C, false);
 
 	/*  force save as regular blend file */
-	fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY);
+	fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY);
 
 	if (BLO_write_file(CTX_data_main(C), filepath, fileflags | G_FILE_USERPREFS, op->reports, NULL) == 0) {
 		printf("fail\n");
@@ -1146,7 +1146,7 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
 	}
 	else {
 		/*  save as regular blend file */
-		int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY);
+		int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY);
 
 		ED_editors_flush_edits(C, false);
 
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index a1d0939..9750bfd 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -428,7 +428,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
 				/* save the undo state as quit.blend */
 				char filename[FILE_MAX];
 				bool has_edited;
-				int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY);
+				int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY);
 
 				BLI_make_file_string("/", filename, BKE_tempdir_base(), BLENDER_QUIT_FILE);




More information about the Bf-blender-cvs mailing list