Add all mecanism about the blender unit test
This commit is contained in:
@@ -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])
|
||||
Reference in New Issue
Block a user