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:
@@ -14,7 +14,7 @@ import sys
|
|||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
BLACKLIST_DIRS = (
|
BLACKLIST_DIRS = (
|
||||||
os.path.join(bpy.utils.resource_path('USER'), "scripts"),
|
bpy.utils.user_resource('SCRIPTS'),
|
||||||
) + tuple(addon_utils.paths()[1:])
|
) + tuple(addon_utils.paths()[1:])
|
||||||
BLACKLIST_ADDONS = set()
|
BLACKLIST_ADDONS = set()
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ if not bpy.app.build_options.xr_openxr:
|
|||||||
BLACKLIST.add("viewport_vr_preview")
|
BLACKLIST.add("viewport_vr_preview")
|
||||||
|
|
||||||
BLACKLIST_DIRS = (
|
BLACKLIST_DIRS = (
|
||||||
os.path.join(bpy.utils.resource_path('USER'), "scripts"),
|
os.path.join(bpy.utils.user_resource('SCRIPTS')),
|
||||||
) + tuple(addon_utils.paths()[1:])
|
) + tuple(addon_utils.paths()[1:])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user