diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 6a90944..5086723 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -81,6 +81,7 @@ "examples/mesh-hygiene-audit", "examples/parent-inverse-orrery", "examples/png-exr-alpha", + "examples/prop-origin-transform", "examples/shader-node-group", "examples/shape-key-blend", "examples/sky-texture-sun-elevation", diff --git a/.github/workflows/blender-smoke.yml b/.github/workflows/blender-smoke.yml index 366473e..c4655eb 100644 --- a/.github/workflows/blender-smoke.yml +++ b/.github/workflows/blender-smoke.yml @@ -505,3 +505,14 @@ jobs: # positive signed volume, Euler V-E+F == 2. Exits non-zero on failure. xvfb-run -a "$BLENDER" --background \ --python examples/mesh-hygiene-audit/mesh_hygiene_audit.py -- + + - name: Shipped example - prop origin transform (base origin + scale + MPI) + run: | + set -euo pipefail + # Check only (no render): street pedestal; asserts scale (1,1,1) after + # data-API apply, local bbox min.z == 0, world AABB unchanged, bare + # parent jumps accessory, matrix_parent_inverse restores world location, + # and matrix_world stays stale until view_layer.update(). Exits non-zero + # on failure. + xvfb-run -a "$BLENDER" --background \ + --python examples/prop-origin-transform/prop_origin_transform.py -- diff --git a/README.md b/README.md index 8c425f5..692088a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

- 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  35 examples + 12 skills  •  6 rules  •  2 templates  •  17 snippets  •  36 examples

@@ -36,7 +36,7 @@ ## Overview -This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 35 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support. +This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 36 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support. The content is consumed by AI coding agents (Cursor, Claude Code, any MCP-capable client) when working on Blender add-ons, geometry nodes scripts, batch pipelines, or animation tooling. There is no build step. Edit the markdown and Python files directly. @@ -537,7 +537,7 @@ portable path is `radius`.

-Game asset pipeline — 8 examples +Game asset pipeline — 9 examples @@ -682,6 +682,23 @@ closed solid (measured 24/44/22, volume 0.989248). Companion to and [`bmesh-gear`](examples/bmesh-gear/) (parametric closed solids). Dual-panel still: DIRTY (injected boundary + loose vert) vs CLEAN. + + + + +
+Prop origin transform: dual-panel TRAP vs MPI KEEP street pedestals — left bare-parent accessory teleports with expected-seat ghost, right accessory stays put, emissive origin markers at base — proving scale apply, base origin, and matrix_parent_inverse + + +### [prop-origin-transform](examples/prop-origin-transform/) + +The origin / scale-apply / MPI contract a prop pipeline relies on before +engine ingest: data-API scale bake to exactly `(1,1,1)`, local bbox +`min.z == 0` (origin at base), world AABB unchanged across the bake, and +`matrix_parent_inverse` so a bolted accessory does not teleport. Extends +[`parent-inverse-orrery`](examples/parent-inverse-orrery/) without retreading +orbits. Dual-panel still: TRAP (bare parent) vs MPI KEEP. +
diff --git a/ROADMAP.md b/ROADMAP.md index 2a412a7..1790433 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -119,9 +119,10 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo - Camera DOF + focus_distance witness: `cam.dof.use_dof`, focus plane vs defocus variance on high-freq cards (Stage deviation — depth needs background content) - Volumetric scatter optical-depth witness: Volume Scatter density → Beer–Lambert transmittance along a known path (Cycles; Stage deviation) - Freestyle SVG / line-set witness: Freestyle line set on a silhouette (full render pass; prefer Line Art first) -- prop-origin-transform witness — origin to base center, `transform_apply` through the data API, delta transforms, `matrix_parent_inverse` so parented children do not teleport; closed forms: post-apply scale exactly (1,1,1), local bbox min Z == 0, world bbox unchanged (builds on `parent-inverse-orrery`, does not duplicate it) +- ~~prop-origin-transform witness~~ **SHIPPED** as `examples/prop-origin-transform/` — origin to base center + data-API scale apply + `matrix_parent_inverse` for a bolted accessory; scale `(1,1,1)`, local `min.z==0`, world AABB delta 0, bare jump ~0.43 m, MPI err ~3e-8; stale `matrix_world` until `view_layer.update()`; byte-identical on 4.5.11 and 5.1.2 - ~~mesh-hygiene-audit witness~~ **SHIPPED** as `examples/mesh-hygiene-audit/` — engine-ingest topology checklist on a stepped street electrical pedestal: no ngons, no loose verts, manifold edges (exactly 2 faces), no zero-area faces (`min_area` printed), positive signed volume, Euler `V−E+F==2` (24/44/22, volume 0.989248); byte-identical on 4.5.11 and 5.1.2; dual-panel dirty vs clean still - UV atlas pack witness — lightmap/unique UV island packing with non-overlap + utilization closed forms (deferred behind hygiene/origin; overlaps `uv-layer-grid` / `triangulate-tangents` / `gltf-export-roundtrip` UV arc) +- Attribute domain witness: writing a POINT-domain color attribute and reading it as if it were CORNER (or vice versa) silently shears colors across shared verts — companion to `color-attribute-wheel` ## Future (uncommitted) diff --git a/docs/gallery/assets/prop-origin-transform-hero.webp b/docs/gallery/assets/prop-origin-transform-hero.webp new file mode 100644 index 0000000..df0116d Binary files /dev/null and b/docs/gallery/assets/prop-origin-transform-hero.webp differ diff --git a/docs/gallery/contact-sheets/prop-origin-transform-contact-sheet.webp b/docs/gallery/contact-sheets/prop-origin-transform-contact-sheet.webp new file mode 100644 index 0000000..d32c754 Binary files /dev/null and b/docs/gallery/contact-sheets/prop-origin-transform-contact-sheet.webp differ diff --git a/docs/gallery/index.html b/docs/gallery/index.html index 4689182..828b266 100644 --- a/docs/gallery/index.html +++ b/docs/gallery/index.html @@ -199,12 +199,14 @@

Examples Gallery

+ + @@ -596,6 +598,17 @@

mesh-hygiene-audit

View example +
+ + prop-origin-transform — Street pedestal origin-to-base-center + data-API scale apply + matrix_parent_inverse for a bolted accessory. + +
+

prop-origin-transform

+

Street pedestal origin-to-base-center + data-API scale apply + matrix_parent_inverse for a bolted accessory. After bake: scale exactly (1,1,1), local min.z==0, world AABB delta 0. Bare parent jumps the accessory (~0.43 m); MPI restores world location (~3e-8). view_layer.update() before reading matrix_world.

+

witnesses AI code parents with child.parent = parent alone (accessory teleports), skips view_layer.update() before matrix_world, or leaves non-uniform scale / centered origin for engine ingest. Skipping apply, origin bake, or MPI each fails a closed-form gate.

+ View example +
+