Merge remote-tracking branch 'origin/main'

# Conflicts:
#	README.md
This commit is contained in:
2022-01-27 14:47:19 +01:00
3 changed files with 94 additions and 18 deletions
+20 -3
View File
@@ -1,6 +1,23 @@
# Blender Docker
Docker project to generate Blender image, really useful to generate Unit Test
# Generate
# Used-it
# Adding an Addon
Mount a new volume with your addon inside a folder (ex `/blender-plugin/plugin-archive.zip`), when you run your docker container add this volume and execute a script to add-it with the blender installed.
Python function to install an addon with Blender. The file his named `install.py`
````python
import bpy
def b3d_install_addon():
bpy.ops.preferences.addon_install(filepath='./plugin-archive.zip')
bpy.ops.preferences.addon_enable(module='plugin-name')
if __name__ == '__main__':
b3d_install_addon()
````
Call this function with blender inside this container
````shell
#!/bin/sh
/opt/blender/blender --background --python "install.py"
````