From 3e8801849f4936fe756ef8e9fabcb310c5279dce Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Wed, 9 Apr 2025 18:57:13 +0200 Subject: [PATCH] UI: Make auto-run scripts setting off by default Even though the default startup already has `Trusted Source` and `Auto Run Python Scripts` off by default, when resetting their values to default (right click, Reset to Default) they would be turned on. It was simply missing explicitly setting this off by default. Pull Request: https://projects.blender.org/blender/blender/pulls/137205 --- release/datafiles/userdef/userdef_default.c | 3 ++- source/blender/windowmanager/intern/wm_files.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c index 468d490bd43..e649511526a 100644 --- a/release/datafiles/userdef/userdef_default.c +++ b/release/datafiles/userdef/userdef_default.c @@ -21,7 +21,8 @@ const UserDef U_default = { .versionfile = BLENDER_FILE_VERSION, .subversionfile = BLENDER_FILE_SUBVERSION, - .flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_RELPATHS | USER_RELEASECONFIRM), + .flag = (USER_AUTOSAVE | USER_TOOLTIPS | USER_RELPATHS | USER_RELEASECONFIRM | + USER_SCRIPT_AUTOEXEC_DISABLE), .dupflag = USER_DUP_MESH | USER_DUP_CURVE | USER_DUP_SURF | USER_DUP_LATTICE | USER_DUP_FONT | USER_DUP_MBALL | USER_DUP_LAMP | USER_DUP_ARM | USER_DUP_CAMERA | USER_DUP_SPEAKER | USER_DUP_ACT | USER_DUP_LIGHTPROBE | USER_DUP_GPENCIL | USER_DUP_CURVES | diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index eb3da684e85..be89ed408c6 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -3340,7 +3340,7 @@ static void wm_open_mainfile_def_property_use_scripts(wmOperatorType *ot) { RNA_def_boolean(ot->srna, "use_scripts", - true, + false, "Trusted Source", "Allow .blend file to execute scripts automatically, default available from " "system preferences");