Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,15 +753,15 @@ and every orbit lands on its closed form.
<table>
<tr>
<td width="46%" valign="middle">
<a href="examples/temp-override-join/"><img src="examples/temp-override-join/preview.webp" alt="Temp-override join: an amber three-step staircase of joined unit cubes on a dark studio floor" /></a>
<a href="examples/temp-override-join/"><img src="examples/temp-override-join/preview.webp" alt="Temp-override join: a red enamel hurricane lantern with a glowing amber globe, wire guard, brass knob and wooden bail grip, joined from seven parts into one object" /></a>
</td>
<td valign="middle">

### [temp-override-join](examples/temp-override-join/)

Three unit cubes joined into a staircase under `bpy.context.temp_override` — the supported
replacement for the removed `context.copy()` dict-pass form. Asserts one mesh remains,
sources are gone, and local Z spans all three steps.
A hurricane lantern joined from seven part objects under `bpy.context.temp_override` — the
supported replacement for the removed `context.copy()` dict-pass form. Asserts one mesh
remains, sources are gone, and the five part materials merge with every face kept on its own.

</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ any example remodel.

- naming (default datablock names): gltf-skin-roundtrip (3 parts), gn-sdf-remesh (`Torus`), turntable (`Suzanne`)
- materials (multi-part, single material): armature-bend (3 parts/1 mat — vertex-color weight bands are the honest display), degenerate-bevel-weld (2/1), driver-wave (16/1, also edge90 1.0)
- edge90 (raw right angles, 1.0): depsgraph-export (also naming + materials), image-pixels-testcard, png-exr-alpha, temp-override-join, text-version-stamp, vse-cut-list; vse-gamma-cross at 0.92
- edge90 (raw right angles, 1.0): depsgraph-export (also naming + materials), image-pixels-testcard, png-exr-alpha, text-version-stamp, vse-cut-list; vse-gamma-cross at 0.92
- reference: gallery best-modeled measure collision-hull-proxy 0.044, custom-normals-shade 0.288, vertex-weight-limit 0.150, lod-decimate-chain 0.019; calibration details in `docs/VISUAL-STYLE.md` § Asset quality

## Future (uncommitted)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/gallery/assets/temp-override-join-hero.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,12 @@ <h2><a href="shader-node-group/">shader-node-group</a></h2>
</article>
<article class="card" data-tags="operators context">
<a class="card-media" href="temp-override-join/" tabindex="-1" aria-hidden="true">
<img src="assets/temp-override-join-hero.webp" alt="Three amber cubes joined into a single diagonal staircase object, the upper steps standing on grey plinths." loading="lazy" decoding="async" />
<img src="assets/temp-override-join-hero.webp" alt="A red enamel hurricane lantern with a glowing amber glass globe, black wire guard, side air tubes, brass wick knob and a wire bail with a wooden grip, all one joined object on a dark studio floor." loading="lazy" decoding="async" />
</a>
<div class="card-body">
<h2><a href="temp-override-join/">temp-override-join</a></h2>
<p class="teaches">Join three unit cubes into a staircase under bpy.context.temp_override — the supported replacement for the removed context.copy() dict-pass form.</p>
<p class="witnesses"><span class="tag">witnesses</span> temp_override actually applies: join consumes the sources, exactly one mesh remains, topology is verts = 8 × steps, and local Z spans all three steps.</p>
<p class="teaches">Join seven lantern parts into one object under bpy.context.temp_override — the supported replacement for the removed context.copy() dict-pass form.</p>
<p class="witnesses"><span class="tag">witnesses</span> temp_override actually applies: join consumes all six sources, exactly one mesh remains, no geometry is lost, the five part materials merge into one slot each with every face still on its own material, and local Z spans foot to grip.</p>
<a class="card-link" href="temp-override-join/">View example<span class="sr-only"> temp-override-join</span> <span aria-hidden="true">&rarr;</span></a>
</div>
</article>
Expand Down
558 changes: 430 additions & 128 deletions docs/gallery/temp-override-join/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
{
"name": "temp-override-join",
"dir": "examples/temp-override-join",
"teaches": "Join three unit cubes into a staircase under bpy.context.temp_override — the supported replacement for the removed context.copy() dict-pass form.",
"alt": "Three amber cubes joined into a single diagonal staircase object, the upper steps standing on grey plinths.",
"witnessesFix": "temp_override actually applies: join consumes the sources, exactly one mesh remains, topology is verts = 8 × steps, and local Z spans all three steps.",
"teaches": "Join seven lantern parts into one object under bpy.context.temp_override — the supported replacement for the removed context.copy() dict-pass form.",
"alt": "A red enamel hurricane lantern with a glowing amber glass globe, black wire guard, side air tubes, brass wick knob and a wire bail with a wooden grip, all one joined object on a dark studio floor.",
"witnessesFix": "temp_override actually applies: join consumes all six sources, exactly one mesh remains, no geometry is lost, the five part materials merge into one slot each with every face still on its own material, and local Z spans foot to grip.",
"hero": "docs/gallery/assets/temp-override-join-hero.webp",
"preview": "examples/temp-override-join/preview.webp",
"tags": [
Expand Down
39 changes: 29 additions & 10 deletions examples/temp-override-join/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# Temp-Override Join

A runnable example that joins three unit cubes into a staircase using
`bpy.context.temp_override`, following the
A runnable example that assembles a hurricane lantern from seven separate part objects
with one `object.join` under `bpy.context.temp_override`, following the
[`prefer-temp-override-over-context-copy`](../../rules/prefer-temp-override-over-context-copy.mdc)
rule and the [`operators`](../../skills/operators/SKILL.md) skill: operators that need a
fabricated active/selection context run under `temp_override(**kwargs)`, not the deprecated
`bpy.context.copy()` dict-pass form removed in Blender 5.x.

**What it witnesses:** `object.join` under `temp_override` actually consumes the sources.
The check asserts closed-form topology (verts = 8 × steps, faces = 6 × steps), that exactly
one mesh remains, that the sources are gone, and that the local Z span covers all three
steps (`[-0.5, 2.5]`). A no-op override (the 5.x failure mode of the old dict-pass path)
leaves only step 0 and the Z span fails.
The parts are the way a prop artist blocks the lantern out: a red enamel fount, an amber
glass globe, an iron wire guard, the two hurricane side air tubes, the bell cap, the wire
bail with its wooden grip, and the brass wick knob and filler cap. Each is its own object
with its own mesh, materials and transform. The join produces the single `Lantern` object an
engine wants.

**What it witnesses:** `object.join` under `temp_override` actually consumes the sources
and merges their material slots. The check asserts that exactly one mesh remains and it is
the target, that all six sources are gone, and that no geometry was lost (verts and faces
equal the sum over the parts). The joined mesh must carry exactly the five part materials,
once each, and every material must still own exactly the faces its parts brought. So the
glass is still glass and the grip is still wood. The local Z span must run from the fount's
foot (0) to the top of the grip (closed form 2.303), which proves the part transforms were
applied. A no-op override (the 5.x failure mode of the old dict-pass path) leaves seven
objects.

**The render is the joined object.** Everything in the still is one mesh object. It shows
five materials because the slots merged and the per-face indices were remapped. If they had
not been, the lantern would render in the target's red enamel from grip to foot. A shadowless
warm point light inside the globe (render-only) stands in for the lit wick.

## Run

Expand Down Expand Up @@ -39,10 +54,14 @@ against it.
| 2 | argparse / usage |
| 3 | Mesh object count after join ≠ 1 (`--no-override` lands here) |
| 4 | Joined target is not the sole remaining mesh |
| 5 | Topology ≠ 24 verts / 18 faces |
| 5 | Verts / faces ≠ the sum over the seven parts |
| 6 | Source objects still present |
| 7 | Local Z span did not cover all steps |
| 8 | `--output` produced no file |
| 7 | Local Z span ≠ [0, 2.303]: a part transform was not applied |
| 8 | Material slots ≠ the five part materials, once each |
| 9 | Faces per material ≠ what the parts brought (indices not remapped) |
| 10 | `--output` framing gate (`gallery_framing`) |
| 11 | `--output` asset-quality floors (`gallery_asset_quality`) |
| 12 | `--output` produced no file |

The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
Expand Down
Binary file modified examples/temp-override-join/preview.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading