From 8260c1ac6c62c8db5b05ffb988e27b03f2b54433 Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Wed, 24 Nov 2021 14:28:15 +0100 Subject: [PATCH] Add basic information about the addon install process --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a113722..b263801 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ # Blender Docker +Docker project to generate Blender image, really usefull to generate Unit Test -Docker project to generate Blender image, really usefull to generate Unit Test \ No newline at end of file + +# 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" +```` \ No newline at end of file