blender-pipeline-automation
Skill1.2k starsChanged 3 days agoMITView on GitHub
Automate Blender 5.3 at scale - headless CLI flags, batch convert/inventory/run-any-skill-script over folders of .blend/.fbx/.glb/.obj/.usd, sharding, bpy pip module, library linking, path management, render-farm and CI patterns. Use for batch jobs, format conversion, library maintenance and pipeline tooling.
- Installs packages
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- blender-addon-developmentSkill
- blender-animationSkill
- blender-asset-qaSkill
- blender-character-riggingSkill
- blender-clothingSkill
- blender-coreSkill
- blender-environment-kitsSkill
- blender-export-pipelinesSkill
- blender-facial-shapekeysSkill
- blender-game-optimizationSkill
- blender-geometry-nodesSkill
- blender-hair-groomingSkill
- blender-hardsurface-modelingSkill
- blender-lighting-lookdevSkill
- blender-pbr-materialsSkill
- blender-renderingSkill
- blender-retopology-uvSkill
- blender-scene-setupSkill
- blender-sculptingSkill
- blender-simulationSkill
- blender-stylized-nprSkill
- blender-texture-bakingSkill
- blender-texturingSkill
- blender-time-of-daySkill
- blender-video-editingSkill
- blender-weather-fxSkill
- blender-workflow-recipesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
Never write into the source folder by default.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pipeline Automation
The execution model is in blender-core (run_in_blender.py finds Blender and prints only the JSON results).
Batch one-liners
blender -b -P scripts/batch_process.py -- --in "assets/**/*.fbx" --op convert --to glb --out export/
blender -b -P scripts/batch_process.py -- --in library/ --op report # inventory JSON lines
blender -b -P scripts/batch_process.py -- --in "src/*.blend" --op script \
--script ../blender-asset-qa/scripts/qa_check.py --kwargs '{"profile":"game"}' # QA a whole library
blender -b -P scripts/batch_process.py -- --in src/ --op script --script ../blender-game-optimization/scripts/make_lods.py \
--kwargs '{"rename":true}' --save-to processed/ # LODs for every fileEach file is streamed as one JSON line with ok, timing and results. Failures don't stop the batch, and the summary lists them. Parallel: start N processes with --shard 0/N … --shard N-1/N (Blender uses one core for Python, so processes scale with CPU/GPU count).
Headless CLI essentials
| Flag | Meaning |
-b | background, no UI. Put it first |
file.blend | open before running scripts. Order matters: args run left to right |
-P script.py / --python-expr "..." | run Python |
--python-exit-code 1 | non-zero exit if the script raises (CI) |
--factory-startup | ignore user prefs/add-ons (reproducible). Bundled add-ons still load |
--addons rigify,io_scene_fbx | enable specific add-ons |
-E CYCLES -o //out/#### -F PNG -s 1 -e 10 -a / -f 5 | render (blender-rendering) |
--command extension build/validate/install-file | extension tooling (blender-addon-development) |
-- --my args | everything after -- goes to the script (sys.argv[sys.argv.index("--")+1:]) |
--log "*", --debug-python | debugging. 5.0 changed the log format, so don't regex progress lines |
Environment variables: BLENDER_USER_SCRIPTS, BLENDER_USER_EXTENSIONS, BLENDER_SYSTEM_PYTHON. Use OCIO for custom color configs. |
bpy as a Python module
pip install bpy==5.3.* (or 5.2.* for the LTS) (Python 3.13, matching the Blender release) gives import bpy in plain Python, which is handy for pytest/CI/web services. It has no UI and no GPU module by default, and it's large (~300 MB). Version-lock it with the Blender you target. The bpy wheel and the CLI behave the same for data API work.
Library patterns
- Append/link:
bpy.data.libraries.load(path, link=...)(seeblender-core/references/bpy-patterns.md). 5.2:data_from.librariesexposes nested library paths when loading. - Write a subset:
bpy.data.libraries.write(path, {datablocks}, fake_user=True, path_remap="RELATIVE_ALL")builds asset/library files from a session. - Find files:
bpy.data.file_path_foreach(...)(5.2 flags:EXPAND_TOKENSfor UDIMs,EXPAND_SEQUENCES,EXPAND_CACHES), andbpy.utils.blend_paths(absolute=True)lists every external path. - Remap/relocate:
bpy.ops.file.find_missing_files(directory=...),make_paths_relative,pack_all. Libraries:lib.filepath = new; lib.reload(). - Iterate every ID:
bpy.data.all_ids(5.2; order isn't stable in 5.3, so sort by name if output must be deterministic), andbpy.data.orphans_purge(do_recursive=True)for cleanup.
Robustness rules
- One task per process where possible. Long Blender sessions leak (images, undo).
batch_process.pyreuses the process but resets withread_factory_settings(use_empty=True)/open_mainfile. - Never write into the source folder by default. Use separate
--out/--save-to, and write withcopy=True. - Make scripts idempotent: re-running replaces their own outputs (named prefixes,
exist_ok). - Log JSON, not prose: one object per file/job, so agents and CI can parse it cheaply.
- Pin the Blender version (5.2 LTS, or 5.3) for a project. Record
bpy.app.version_string+ hash (bpy.app.build_hash) in the outputs. - Paths:
bpy.path.abspath("//x")is relative to the opened .blend. In headless batches use absolute paths, or set them afteropen_mainfile. - GPU in containers: Cycles CUDA/OptiX needs the NVIDIA container runtime. Otherwise use CPU. EEVEE needs a GPU/EGL even headless.
CI recipe (GitHub Actions)
Download the Linux tarball (https://download.blender.org/release/Blender5.3/blender-5.3.0-linux-x64.tar.xz), cache it, then blender -b --factory-startup --python-exit-code 1 -P tests/run_all.py. This repo's .github/workflows/ci.yml is a working example.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

