# raea blender

> Run a Blender Python script headless, with raea's library of mesh scripts: convert, decimate, repair, split, bake, rig, cloth.

`raea blender run` runs `blender --background --python SCRIPT.py -- ARGS` with the Blender [`raea setup
blender`](setup.md) found. A script named `blender/X.py` that the project doesn't have is copied in from raea's
library first: `convert`, `decimate`, `repair`, `split`, `bake`, `rig` and `cloth`. The copy is the project's own
to change.

```sh
raea blender run blender/decimate.py -- model.glb 0.3 model-low.glb
raea blender run blender/repair.py -- scan.glb scan-fixed.glb
```


## Usage

```sh
raea setup blender [--check] [--download]   (find Blender or download the LTS into ~/.raea/tools/blender, and install its MCP add-on)
raea blender run SCRIPT.py [ARGS...]   (blender --background --python SCRIPT.py -- ARGS, headless; blender/X.py missing from the project is copied from the library: convert, decimate, repair, split, bake, rig, cloth)
```

Headless: it needs nothing running and opens no window. Its arguments go to a parser of its own, whose forms are listed above.
