diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 8 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 09a063e11f4..992694a71c2 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -412,8 +412,8 @@ static PyGetSetDef bpy_app_getsets[] = { {(char *)"render_preview_size", bpy_app_preview_render_size_get, NULL, (char *)bpy_app_preview_render_size_doc, (void *)ICON_SIZE_PREVIEW}, /* security */ - {(char *)"autoexec_fail", bpy_app_global_flag_get, NULL, NULL, (void *)G_SCRIPT_AUTOEXEC_FAIL}, - {(char *)"autoexec_fail_quiet", bpy_app_global_flag_get, NULL, NULL, (void *)G_SCRIPT_AUTOEXEC_FAIL_QUIET}, + {(char *)"autoexec_fail", bpy_app_global_flag_get, NULL, NULL, (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL}, + {(char *)"autoexec_fail_quiet", bpy_app_global_flag_get, NULL, NULL, (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET}, {(char *)"autoexec_fail_message", bpy_app_autoexec_fail_message_get, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL} }; diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index a8e21d0e2e1..e45a9c221f6 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -402,9 +402,9 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna, ChannelDriver *driver, C return 0.0f; #ifndef USE_BYTECODE_WHITELIST - if (!(G.f & G_SCRIPT_AUTOEXEC)) { - if (!(G.f & G_SCRIPT_AUTOEXEC_FAIL_QUIET)) { - G.f |= G_SCRIPT_AUTOEXEC_FAIL; + if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC)) { + if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) { + G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL; BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Driver '%s'", expr); printf("skipping driver '%s', automatic scripts are disabled\n", expr); @@ -543,7 +543,7 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna, ChannelDriver *driver, C #ifdef USE_BYTECODE_WHITELIST if (is_recompile && expr_code) { - if (!(G.f & G_SCRIPT_AUTOEXEC)) { + if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC)) { if (!bpy_driver_secure_bytecode_validate( expr_code, (PyObject *[]){ bpy_pydriver_Dict, diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 287313d6f3e..c7186c8fb85 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -389,7 +389,7 @@ void BPY_python_end(void) void BPY_python_reset(bContext *C) { /* unrelated security stuff */ - G.f &= ~(G_SCRIPT_AUTOEXEC_FAIL | G_SCRIPT_AUTOEXEC_FAIL_QUIET); + G.f &= ~(G_FLAG_SCRIPT_AUTOEXEC_FAIL | G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET); G.autoexec_fail[0] = '\0'; BPY_driver_reset(); @@ -764,9 +764,9 @@ void BPY_modules_load_user(bContext *C) for (text = bmain->text.first; text; text = text->id.next) { if (text->flags & TXT_ISSCRIPT && BLI_path_extension_check(text->id.name + 2, ".py")) { - if (!(G.f & G_SCRIPT_AUTOEXEC)) { - if (!(G.f & G_SCRIPT_AUTOEXEC_FAIL_QUIET)) { - G.f |= G_SCRIPT_AUTOEXEC_FAIL; + if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC)) { + if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) { + G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL; BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Text '%s'", text->id.name + 2); printf("scripts disabled for \"%s\", skipping '%s'\n", BKE_main_blendfile_path(bmain), text->id.name + 2); |