diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-02 06:45:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-02 06:45:42 +0300 |
commit | 99b8eef6a534c2c9846b48736cb9eb007c120ec7 (patch) | |
tree | 4e036c62c46c9ccd805506165e9b7fcfa13b551b /source/blender/blenkernel | |
parent | d46c910b1a105287bccccd651056a9a0a73b3936 (diff) |
BKE_global: clear deprecated flags on load (all of them)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 17baab1f579..045fc772426 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -107,8 +107,9 @@ typedef struct Global { /** #Global.f */ enum { G_FLAG_RENDER_VIEWPORT = (1 << 0), - G_FLAG_BACKBUFSEL = (1 << 4), - G_FLAG_PICKSEL = (1 << 5), + G_FLAG_BACKBUFSEL = (1 << 1), + G_FLAG_PICKSEL = (1 << 2), + G_FLAG_SCRIPT_AUTOEXEC = (1 << 13), /** When this flag is set ignore the prefs #USER_SCRIPT_AUTOEXEC_DISABLE. */ G_FLAG_SCRIPT_OVERRIDE_PREF = (1 << 14), @@ -120,6 +121,9 @@ enum { #define G_FLAG_ALL_RUNTIME \ (G_FLAG_SCRIPT_AUTOEXEC | G_FLAG_SCRIPT_OVERRIDE_PREF) +/** Flags to read from blend file. */ +#define G_FLAG_ALL_READFILE 0 + /** #Global.debug */ enum { G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */ diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 075d05eebe8..fb03dc6963e 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -292,6 +292,7 @@ static void setup_app_data( /* special cases, override loaded flags: */ if (G.f != bfd->globalf) { const int flags_keep = G_FLAG_ALL_RUNTIME; + bfd->globalf &= G_FLAG_ALL_READFILE; bfd->globalf = (bfd->globalf & ~flags_keep) | (G.f & flags_keep); } |