Cleanup: deprecate some G.fileflags comment others

This commit is contained in:
Campbell Barton 2015-07-27 10:36:11 +10:00
parent 2fe7e60633
commit cdf2dbeb1f
Notes: blender-bot 2023-02-14 09:48:25 +01:00
Referenced by issue #45578, Duplicate Addons Hotkeys
Referenced by issue #45579, Custom Hotkeys Dissapear
Referenced by issue #45575, CUDA error with Cmake build
Referenced by issue #45577, Sculpt tiling seems to break some brushes
3 changed files with 20 additions and 7 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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);