Add all mecanism about the blender unit test

This commit is contained in:
Aurelien Vaillant
2022-01-24 16:56:40 +01:00
parent 5b16883077
commit 435d013d58
7 changed files with 144 additions and 3 deletions
+20
View File
@@ -0,0 +1,20 @@
import sys
import bpy
# Paste this variable in the blender.py
dependency = {
# 'moderlab_plugin': ['moderlab_plugin.zip', 'Moderlab-Production/BlenderPlugin'],
'moderlab_type': ['moderlab_type.zip', 'Moderlab-Production/BlenderObjectType'],
# 'uv-packer': ['uv-packer.zip', 'Moderlab-Production/UvPacker'],
}
def b3d_install_addon(addon_path: str):
for key, value in dependency.items():
bpy.ops.preferences.addon_install(filepath=f'{addon_path}/{value[0]}')
bpy.ops.preferences.addon_enable(module=key)
bpy.ops.wm.save_userpref()
if __name__ == '__main__':
b3d_install_addon(sys.argv[-1])