From 3e775a4fc57cfd48954adcf284354312f34d5412 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 13 Aug 2021 15:51:08 +1000 Subject: PyAPI: remove the .py extension requirement for startup registration This was left over from when these scripts were loaded as modules, where their names needed to be compatible with Pythons module naming. Version patch existing files so text with register enabled without a `.py` extension wont start executing on startup. Resolves T89532. --- source/blender/python/intern/bpy_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 945933dd8b7..1a308414bc3 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -655,7 +655,7 @@ void BPY_modules_load_user(bContext *C) bpy_context_set(C, &gilstate); for (text = bmain->texts.first; text; text = text->id.next) { - if (text->flags & TXT_ISSCRIPT && BLI_path_extension_check(text->id.name + 2, ".py")) { + if (text->flags & TXT_ISSCRIPT) { if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC)) { if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) { G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL; -- cgit v1.2.3