From 596a53f33653f75f6fd3c6700f8ab1b96f60465c Mon Sep 17 00:00:00 2001 From: Strike Digital <59890307+strike-digital@users.noreply.github.com> Date: Sun, 14 Jul 2024 13:06:42 +0100 Subject: [PATCH] Don't modify sys.path if not a legacy addon --- pythonFiles/include/blender_vscode/load_addons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonFiles/include/blender_vscode/load_addons.py b/pythonFiles/include/blender_vscode/load_addons.py index 9a825a4..f802092 100644 --- a/pythonFiles/include/blender_vscode/load_addons.py +++ b/pythonFiles/include/blender_vscode/load_addons.py @@ -22,7 +22,7 @@ def setup_addon_links(addons_to_load: list[AddonInfo]): if not os.path.exists(user_addon_directory): os.makedirs(user_addon_directory) - if not str(user_addon_directory) in sys.path: + if is_addon_legacy(Path(addon_info.load_dir)) and not str(user_addon_directory) in sys.path: sys.path.append(str(user_addon_directory)) if is_in_any_addon_directory(addon_info.load_dir):