[Bf-blender-cvs] [be7031bee34] master: Fix bpy.utils.script_paths ignoring user_pref arg

Campbell Barton noreply at git.blender.org
Thu May 9 05:24:53 CEST 2019


Commit: be7031bee348c27ecc92b1bf9e2046f1108a7301
Author: Campbell Barton
Date:   Thu May 9 13:21:53 2019 +1000
Branches: master
https://developer.blender.org/rBbe7031bee348c27ecc92b1bf9e2046f1108a7301

Fix bpy.utils.script_paths ignoring user_pref arg

===================================================================

M	release/scripts/modules/bpy/utils/__init__.py

===================================================================

diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py
index 86eea422cf9..d3e0ecc729d 100644
--- a/release/scripts/modules/bpy/utils/__init__.py
+++ b/release/scripts/modules/bpy/utils/__init__.py
@@ -353,10 +353,11 @@ def script_paths(subdir=None, user_pref=True, check_all=False, use_user=True):
             *base_paths,
         )
 
-    if use_user:
-        test_paths = (*base_paths, script_path_user(), script_path_pref())
-    else:
-        test_paths = (*base_paths, script_path_pref())
+    test_paths = (
+        *base_paths,
+        *((script_path_user(),) if use_user else ()),
+        *((script_path_pref(),) if user_pref else ()),
+    )
 
     for path in test_paths:
         if path:



More information about the Bf-blender-cvs mailing list