Blender 5.1.2 (#1)
Refactoring to works with the new blender depot config Reviewed-on: #1 Co-authored-by: stilobique <contact@aurelien-vaillant.net>
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
[](https://www.blender.org/download/)
|
||||
[](https://gitlab.com/stilobique/blender-docker/-/commits/main)
|
||||
[](https://www.blender.org/download/)
|
||||
|
||||
|
||||
# Blender Docker
|
||||
This repository is an automated blender docker image file generated, it's usefully with blender addon unit test. To
|
||||
build a new specific image, you need to update the `build.json` file with the new version witched ; or
|
||||
This repository is an automated blender docker image file generated, it's usefully with blender addon unit test.
|
||||
|
||||
|
||||
# Adding an Addon
|
||||
# Building
|
||||
## Start your build
|
||||
You can use Invoke to easily start a build, a clean or more.
|
||||
```shell
|
||||
invoke --li
|
||||
```
|
||||
## Debug and logs
|
||||
Some log are generated inside a `logs` folder.
|
||||
- `build`: all operation on build docker file.
|
||||
- `clean`: from the dedicated function to clean all dockers images and cache.
|
||||
- `test`: simple class method to try a specific docker image.
|
||||
|
||||
## Check if the build work
|
||||
|
||||
# Use case
|
||||
## 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`
|
||||
@@ -25,4 +38,39 @@ Call this function with blender inside this container
|
||||
````shell
|
||||
#!/bin/sh
|
||||
/opt/blender/blender --background --python "install.py"
|
||||
````
|
||||
````
|
||||
|
||||
# Check Image build
|
||||
```shell
|
||||
docker run --rm stilobique/blender:5.1.2 ./blender --version
|
||||
```
|
||||
|
||||
```shell
|
||||
# Taille de l'image
|
||||
docker image inspect stilobique/blender:5.1.2 --format='{{.Size}}' | numfmt --to=iec
|
||||
|
||||
# Dépendances manquantes
|
||||
docker run --rm --entrypoint /bin/bash stilobique/blender:5.1.2 -c 'ldd /opt/blender/blender | grep "not found" || echo "All deps OK"'
|
||||
|
||||
# Test fonctionnel
|
||||
docker run --rm stilobique/blender:5.1.2 ./blender -b --python-expr "import bpy; print('OK:', bpy.app.version_string)"
|
||||
```
|
||||
|
||||
|
||||
# CLI helper tasks
|
||||
Reusable helpers (`tasks.py`) are exposed as [invoke](https://www.pyinvoke.org/) tasks.
|
||||
|
||||
```shell
|
||||
# List available tasks
|
||||
invoke clean
|
||||
|
||||
# Clean Docker (all contexts: default, podman, ...)
|
||||
python -m blender.cli clean
|
||||
|
||||
# List Blender tags (Gitea)
|
||||
python -m blender.cli get-tags-release
|
||||
|
||||
# List stilobique/blender tags (Docker Hub)
|
||||
python -m blender.cli get-tags-docker
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user