From ac09d18e4e7cca56cb33352ce750ea7e5568c7bb Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 12 Apr 2023 12:47:22 +0200 Subject: [PATCH] Fix #106840: Add-ons not loading from custom script directories `script_paths()` wasn't updated correctly, but that was hidden by some compabtibility logic that was in the patch earlier. Only with my last change to the PR before merging it that was removed and the error became quite visible. --- scripts/modules/bpy/utils/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/modules/bpy/utils/__init__.py b/scripts/modules/bpy/utils/__init__.py index 406016d82a0..e76559c07a0 100644 --- a/scripts/modules/bpy/utils/__init__.py +++ b/scripts/modules/bpy/utils/__init__.py @@ -355,7 +355,7 @@ def script_paths(*, subdir=None, user_pref=True, check_all=False, use_user=True) :arg subdir: Optional subdir. :type subdir: string - :arg user_pref: Include the user preference script path. + :arg user_pref: Include the user preference script paths. :type user_pref: bool :arg check_all: Include local, user and system paths rather just the paths Blender uses. :type check_all: bool @@ -387,6 +387,9 @@ def script_paths(*, subdir=None, user_pref=True, check_all=False, use_user=True) if use_user: base_paths.append(path_user) + if user_pref: + base_paths.extend(script_paths_pref()) + scripts = [] for path in base_paths: if not path: