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.
This commit is contained in:
Campbell Barton 2022-09-29 17:10:22 +10:00
parent 46076e4876
commit a66e584294
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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:])