Install
openclaw skills install blender-renderAutomate Blender headless previews for STL/OBJ/FBX/BIM and multi-part 3D-print models. Use for local-path model import, Workbench orthographic previews, stable part colors, exploded views, contact sheets, simple Cycles beauty renders, and BIM fallback snapshots without opening the Blender UI.
openclaw skills install blender-renderUse this skill when the user needs quick, reliable images from local 3D assets: STL/OBJ/PLY print models, multi-part model folders, or BIM/Revit FBX exports. For actual 3D-print splitting, clearance, 3MF validation, or assembly-fit debugging, use a dedicated 3D-print workflow instead; this skill only produces previews/renders.
5.0.1. Use the installed Blender that works on the host, ideally current stable/LTS.Resolve Blender in this order:
${BLENDER_BIN:-$(command -v blender || echo /Applications/Blender.app/Contents/MacOS/Blender)}
If that path fails, try command -v blender. If Blender is missing, ask before installing.
This is the preferred workflow for technical handoff previews: deterministic colors, orthographic front/iso views, optional exploded layout, and a contact sheet for chat/slicer review.
BLENDER_BIN="${BLENDER_BIN:-/Applications/Blender.app/Contents/MacOS/Blender}"
"$BLENDER_BIN" --background \
--python scripts/render_stl_set_preview.py -- \
--input /path/to/final_parts_dir \
--output-dir /path/to/preview \
--prefix model-preview \
--explode 0.35
If the source format carries useful imported materials (for example OBJ+MTL), add --preserve-materials. For plain STL handoff previews, leave it off so the script assigns stable high-contrast colors. Contact sheets require Pillow (python3 -m pip install pillow) if it is not already available.
Then optionally create a labeled contact sheet:
python3 scripts/make_contact_sheet.py \
--output /path/to/preview/model-preview-contact-sheet.png \
--image /path/to/preview/model-preview-front.png --label 正面预览 \
--image /path/to/preview/model-preview-iso.png --label 透视预览
Quality checks:
For STL/OBJ models where the goal is a nicer preview with procedural material and lighting:
BLENDER_BIN="${BLENDER_BIN:-/Applications/Blender.app/Contents/MacOS/Blender}"
"$BLENDER_BIN" --background \
--python scripts/render_standard.py -- \
--input /path/to/model.stl \
--output /path/to/output_prefix \
--device auto \
--samples 64 \
--resolution 1400
This emits *_front.png, *_side.png, and *_top.png. Use --device cpu for portable smoke tests; use --device gpu only when GPU rendering is configured.
BIM FBX often imports with hierarchy/material problems and may appear black in Cycles/Eevee. Use Workbench and force visibility:
BLENDER_BIN="${BLENDER_BIN:-/Applications/Blender.app/Contents/MacOS/Blender}"
"$BLENDER_BIN" --background \
--python scripts/render_bim.py -- \
--input /path/to/structure.fbx \
--output /path/to/structure-preview.png
After editing bundled scripts, at least run:
python3 -m py_compile scripts/*.py
A real Blender render smoke test is better, but only run it when Blender is available and the user permits access to the chosen local model paths.