Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-29 10:10:22 +0300
committerJeroen Bakker <jeroen@blender.org>2022-10-03 15:59:17 +0300
commit56f7b7a9c5aa30379c9fac6f9ffb8a10cc18089b (patch)
treef1661c33ae3ed07fe1544f758ce86554ef595c03
parent78349c2578c10a5de10011fbbe07ecb62025eaa7 (diff)
Cleanup: correct API usage for script access
In practice this didn't cause problems, but accessing scripts via bpy.utils.resource_path('USER') ignores the BLENDER_USER_SCRIPTS environment variable.
-rw-r--r--tests/python/bl_load_addons.py2
-rw-r--r--tests/python/bl_load_py_modules.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/python/bl_load_addons.py b/tests/python/bl_load_addons.py
index b67bc22102c..8c90a1f93b8 100644
--- a/tests/python/bl_load_addons.py
+++ b/tests/python/bl_load_addons.py
@@ -14,7 +14,7 @@ import sys
import importlib
BLACKLIST_DIRS = (
- os.path.join(bpy.utils.resource_path('USER'), "scripts"),
+ bpy.utils.user_resource('SCRIPTS'),
) + tuple(addon_utils.paths()[1:])
BLACKLIST_ADDONS = set()
diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py
index 784d8984935..48087179554 100644
--- a/tests/python/bl_load_py_modules.py
+++ b/tests/python/bl_load_py_modules.py
@@ -42,7 +42,7 @@ if not bpy.app.build_options.xr_openxr:
BLACKLIST.add("viewport_vr_preview")
BLACKLIST_DIRS = (
- os.path.join(bpy.utils.resource_path('USER'), "scripts"),
+ os.path.join(bpy.utils.user_resource('SCRIPTS')),
) + tuple(addon_utils.paths()[1:])