Blender mesh authoring
Use blender-python-execution for live MCP calls. Prefer direct mesh/data APIs
for deterministic creation and reserve context-sensitive operators for edit-mode
tools that have no practical data API equivalent.
Read references/bpy-mesh-recipes.md before creating geometry, changing
parenting, or applying modifiers. Use caller-owned stable names and refuse to
replace an incompatible existing datablock.
Authoring contract
- Inspect the target object, mesh users, parent, collections, modifiers, mode,
selection, and evaluated bounds before mutation.
- Create or update only named caller-owned objects. Build custom topology with
Mesh.from_pydata or bmesh; call mesh.validate() and mesh.update().
- Set transforms absolutely. When reparenting without a visible jump, preserve
matrix_world, assign the parent, then restore matrix_world.
- Name modifiers, reject type collisions, and set their order deliberately.
Do not apply a modifier unless destructive topology conversion was requested.
- Call
view_layer.update(), inspect the evaluated object, and run
scripts/audit_mesh.py on every primary target.
- Inspect a current viewport or inexpensive render for visible tasks. Numeric
validity does not establish silhouette, proportions, or shading quality.
For MCP, prepend
MESH_AUDIT_REQUEST = {"objects": ["GEO-subject"]} and append the complete
audit script. For a saved derivative:
blender --background scene.blend --python scripts/audit_mesh.py -- \
--objects GEO-subject GEO-trim
Require ok: true, finite evaluated coordinates and bounds, nonempty evaluated
faces, valid polygon indices, and no zero-area evaluated faces. Boundary and
non-manifold edge counts are reported for task-specific decisions: an open
cloth or plane may be correct, while a printable solid normally requires both
counts to be zero.
Failure rules
- Stop on missing targets, linked non-editable data, incompatible name
collisions, non-finite transforms, invalid face indices, or empty evaluated
output.
- Preserve selection, active object, and mode around operators. Never use
selection as object identity.
- Do not clear the scene, apply all transforms/modifiers, merge by distance, or
recalculate normals globally as an incidental repair.
- Save only to an absolute caller-selected derivative path; never overwrite the
source implicitly.
1---2name: blender-mesh-authoring3description: Create, modify, parent, and validate Blender mesh objects with stable names, direct data APIs, explicit modifier order, evaluated geometry checks, and reversible MCP transactions. Use for primitives, custom vertex/face meshes, transforms, parenting, bevel/solidify/subdivision modifiers, or topology repair when an out-of-box agent needs exact bpy mechanics rather than general modeling advice.4---56# Blender mesh authoring78Use `blender-python-execution` for live MCP calls. Prefer direct mesh/data APIs9for deterministic creation and reserve context-sensitive operators for edit-mode10tools that have no practical data API equivalent.1112Read `references/bpy-mesh-recipes.md` before creating geometry, changing13parenting, or applying modifiers. Use caller-owned stable names and refuse to14replace an incompatible existing datablock.1516## Authoring contract17181. Inspect the target object, mesh users, parent, collections, modifiers, mode,19 selection, and evaluated bounds before mutation.202. Create or update only named caller-owned objects. Build custom topology with21 `Mesh.from_pydata` or `bmesh`; call `mesh.validate()` and `mesh.update()`.223. Set transforms absolutely. When reparenting without a visible jump, preserve23 `matrix_world`, assign the parent, then restore `matrix_world`.244. Name modifiers, reject type collisions, and set their order deliberately.25 Do not apply a modifier unless destructive topology conversion was requested.265. Call `view_layer.update()`, inspect the evaluated object, and run27 `scripts/audit_mesh.py` on every primary target.286. Inspect a current viewport or inexpensive render for visible tasks. Numeric29 validity does not establish silhouette, proportions, or shading quality.3031For MCP, prepend32`MESH_AUDIT_REQUEST = {"objects": ["GEO-subject"]}` and append the complete33audit script. For a saved derivative:3435```text36blender --background scene.blend --python scripts/audit_mesh.py -- \37 --objects GEO-subject GEO-trim38```3940Require `ok: true`, finite evaluated coordinates and bounds, nonempty evaluated41faces, valid polygon indices, and no zero-area evaluated faces. Boundary and42non-manifold edge counts are reported for task-specific decisions: an open43cloth or plane may be correct, while a printable solid normally requires both44counts to be zero.4546## Failure rules4748- Stop on missing targets, linked non-editable data, incompatible name49 collisions, non-finite transforms, invalid face indices, or empty evaluated50 output.51- Preserve selection, active object, and mode around operators. Never use52 selection as object identity.53- Do not clear the scene, apply all transforms/modifiers, merge by distance, or54 recalculate normals globally as an incidental repair.55- Save only to an absolute caller-selected derivative path; never overwrite the56 source implicitly.