Skip to content

Commit

Permalink
Add check if user_addon_directory is in python sys path so the addon …
Browse files Browse the repository at this point in the history
…could be loaded as module and enabled in blender.
  • Loading branch information
schlegel11 committed Jul 11, 2019
1 parent b5594f9 commit c96ce80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pythonFiles/include/blender_vscode/load_addons.py
Expand Up @@ -10,6 +10,9 @@ def setup_addon_links(addons_to_load):
if not os.path.exists(user_addon_directory):
os.makedirs(user_addon_directory)

if not str(user_addon_directory) in sys.path:
sys.path.append(str(user_addon_directory))

path_mappings = []

for source_path, module_name in addons_to_load:
Expand Down

0 comments on commit c96ce80

Please sign in to comment.