also prepend modules to sys path

This commit is contained in:
iLLiCiTiT 2021-05-20 17:13:23 +02:00
parent a32624f22b
commit df5c4aebd8

View file

@ -78,8 +78,12 @@ def load_scripts(paths):
addons_paths = []
for base_path in paths:
addons_path = os.path.join(base_path, "addons")
if os.path.exists(addons_path):
addons_paths.append(addons_path)
if not os.path.exists(addons_path):
continue
addons_paths.append(addons_path)
addons_module_path = os.path.join(addons_path, "modules")
if os.path.exists(addons_module_path):
bpy.utils._sys_path_ensure_prepend(addons_module_path)
if addons_paths:
# Fake addons