diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 28 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 |
6 files changed, 16 insertions, 26 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 0724a82c8d7..75eb5a327de 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -106,24 +106,14 @@ typedef struct Global { /** #Global.f */ enum { - G_RENDER_OGL = (1 << 0), - G_SWAP_EXCHANGE = (1 << 1), -/* #define G_RENDER_SHADOW (1 << 3) */ /* temp flag, removed */ - G_BACKBUFSEL = (1 << 4), - G_PICKSEL = (1 << 5), - -/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_FACE_SEL) */ - - G_SCRIPT_AUTOEXEC = (1 << 13), - /** When this flag is set ignore the userprefs. */ - G_SCRIPT_OVERRIDE_PREF = (1 << 14), - G_SCRIPT_AUTOEXEC_FAIL = (1 << 15), - G_SCRIPT_AUTOEXEC_FAIL_QUIET = (1 << 16), - -/* #define G_NOFROZEN (1 << 17) also removed */ -/* #define G_GREASEPENCIL (1 << 17) also removed */ - -/* #define G_AUTOMATKEYS (1 << 30) also removed */ + G_FLAG_RENDER_VIEWPORT = (1 << 0), + G_FLAG_BACKBUFSEL = (1 << 4), + G_FLAG_PICKSEL = (1 << 5), + 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), + G_FLAG_SCRIPT_AUTOEXEC_FAIL = (1 << 15), + G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET = (1 << 16), }; /** #Global.debug */ @@ -161,7 +151,7 @@ enum { /** #Global.fileflags */ enum { - G_AUTOPACK = (1 << 0), + G_FILE_AUTOPACK = (1 << 0), G_FILE_COMPRESS = (1 << 1), G_FILE_USERPREFS = (1 << 9), diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index d046b91ea19..d6b3008062a 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -127,9 +127,9 @@ void BKE_blender_globals_init(void) BKE_blender_version_string(versionstr, sizeof(versionstr), BLENDER_VERSION, BLENDER_SUBVERSION, true, true); #ifndef WITH_PYTHON_SECURITY /* default */ - G.f |= G_SCRIPT_AUTOEXEC; + G.f |= G_FLAG_SCRIPT_AUTOEXEC; #else - G.f &= ~G_SCRIPT_AUTOEXEC; + G.f &= ~G_FLAG_SCRIPT_AUTOEXEC; #endif G.log.level = 1; diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 589f0bee470..164b0a2bd30 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -291,7 +291,7 @@ static void setup_app_data( /* special cases, override loaded flags: */ if (G.f != bfd->globalf) { - const int flags_keep = (G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); + const int flags_keep = (G_FLAG_SCRIPT_AUTOEXEC | G_FLAG_SCRIPT_OVERRIDE_PREF); bfd->globalf = (bfd->globalf & ~flags_keep) | (G.f & flags_keep); } diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index e83964f543d..0eded353031 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -2055,7 +2055,7 @@ static void pycon_get_tarmat(struct Depsgraph *UNUSED(depsgraph), /* only execute target calculation if allowed */ #ifdef WITH_PYTHON - if (G.f & G_SCRIPT_AUTOEXEC) + if (G.f & G_FLAG_SCRIPT_AUTOEXEC) BPY_pyconstraint_target(data, ct); #endif } @@ -2072,7 +2072,7 @@ static void pycon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targe bPythonConstraint *data = con->data; /* only evaluate in python if we're allowed to do so */ - if ((G.f & G_SCRIPT_AUTOEXEC) == 0) return; + if ((G.f & G_FLAG_SCRIPT_AUTOEXEC) == 0) return; /* Now, run the actual 'constraint' function, which should only access the matrices */ BPY_pyconstraint_exec(data, cob, targets); diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 5f62ea2ad37..1a70fb398ae 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -269,7 +269,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) BLI_strncpy(vfont->name, filepath, sizeof(vfont->name)); /* if autopack is on store the packedfile in de font structure */ - if (!is_builtin && (G.fileflags & G_AUTOPACK)) { + if (!is_builtin && (G.fileflags & G_FILE_AUTOPACK)) { vfont->packedfile = pf; } diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c9fbb45a5b7..321d02e7dc3 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -3474,7 +3474,7 @@ static ImBuf *load_image_single( *r_assign = true; /* make packed file for autopack */ - if ((has_packed == false) && (G.fileflags & G_AUTOPACK)) { + if ((has_packed == false) && (G.fileflags & G_FILE_AUTOPACK)) { ImagePackedFile *imapf = MEM_mallocN(sizeof(ImagePackedFile), "Image Packefile"); BLI_addtail(&ima->packedfiles, imapf); |