You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dfcbd52
Browse filesBrowse the repository at this point in the historyBrowse files
fix(examples): regenerate the gallery page and examples index after #489
3c5490b changed temp-override-join's README and the smoke catalog without
regenerating docs/gallery/temp-override-join/ or examples/index.json, so
both drift checks went red. The exit-13 row also still pointed at
--clear-active-on-deselect as if it were a falsifier.
Refs #489
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/gallery/temp-override-join/index.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ <h1>Temp Override Join</h1>
64
64
<p>A runnable example that assembles a hurricane lantern from seven separate part objects with one <code>object.join</code> under <code>bpy.context.temp_override</code>, following the <ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/rules/prefer-temp-override-over-context-copy.mdc"><code>prefer-temp-override-over-context-copy</code></a> rule and the <ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/operators/SKILL.md"><code>operators</code></a> skill: operators that need a fabricated active/selection context run under <code>temp_override(**kwargs)</code>, not the deprecated <code>bpy.context.copy()</code> dict-pass form removed in Blender 5.x.</p>
65
65
<p>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 <code>Lantern</code> object an engine wants.</p>
66
66
<p><strong>What it witnesses:</strong><code>object.join</code> under <code>temp_override</code> 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.</p>
67
-
<p><strong>Why the override passes the selection explicitly.</strong> Before the join, the check makes the target active, selects every part, and runs <code>select_all(action='DESELECT')</code>. The target is still <code>context.active_object</code> while <code>selected_objects</code> is empty and <code>target.select_get()</code> is <code>False</code>. Active and selected are independent, so an <code>if obj is None</code> guard passes on a selection that is gone (see the <ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/operators/SKILL.md"><code>operators</code></a> skill, Defensive context handling). The scene is then reset to no active object before the join. <code>--clear-active-on-deselect</code> models the wrong belief that deselecting clears the active object, and exits 13.</p>
67
+
<p><strong>Why the override passes the selection explicitly.</strong> Before the join, the check makes the target active, selects every part, and runs <code>select_all(action='DESELECT')</code>. The target is still <code>context.active_object</code> while <code>selected_objects</code> is empty and <code>target.select_get()</code> is <code>False</code>. Active and selected are independent, so an <code>if obj is None</code> guard passes on a selection that is gone (see the <ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/operators/SKILL.md"><code>operators</code></a> skill, Defensive context handling). The scene is then reset to no active object before the join. <code>--clear-active-on-deselect</code> is a self-check, not a falsifier: the script clears the active object itself, then shows exit 13 reports it. No Blender deselection clears the active object (that is the contract), so the default run is the witness: if a Blender release changed that, it would exit 13 (#489).</p>
68
68
<p><strong>The render is the joined object.</strong> 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.</p>
69
69
<h2id="run">Run<aclass="anchor" href="#run" aria-label="Link to this section">#</a></h2>
70
70
<pretabindex="0"><code># Cheap correctness check (no render) — the CI check:
@@ -73,16 +73,16 @@ <h2 id="run">Run<a class="anchor" href="#run" aria-label="Link to this section">
73
73
# Falsifier: join without temp_override. Must exit non-zero.
<h2id="exit-codes">Exit codes<aclass="anchor" href="#exit-codes" aria-label="Link to this section">#</a></h2>
83
83
<p>Per-script sequential checks. <code>9</code> is a valid check code; there is no rule against it.</p>
84
-
<divclass="table-wrap"><table><thead><tr><thscope="col">Code</th><thscope="col">Meaning</th></tr></thead><tbody><tr><td>0</td><td>Success</td></tr><tr><td>1</td><td>Uncaught exception (FATAL wrapper)</td></tr><tr><td>2</td><td>argparse / usage</td></tr><tr><td>3</td><td>Mesh object count after join ≠ 1 (<code>--no-override</code> lands here)</td></tr><tr><td>4</td><td>Joined target is not the sole remaining mesh</td></tr><tr><td>5</td><td>Verts / faces ≠ the sum over the seven parts</td></tr><tr><td>6</td><td>Source objects still present</td></tr><tr><td>7</td><td>Local Z span ≠ [0, 2.303]: a part transform was not applied</td></tr><tr><td>8</td><td>Material slots ≠ the five part materials, once each</td></tr><tr><td>9</td><td>Faces per material ≠ what the parts brought (indices not remapped)</td></tr><tr><td>10</td><td><code>--output</code> framing gate (<code>gallery_framing</code>)</td></tr><tr><td>11</td><td><code>--output</code> asset-quality floors (<code>gallery_asset_quality</code>)</td></tr><tr><td>12</td><td><code>--output</code> produced no file</td></tr><tr><td>13</td><td>After deselect-all the target is not still active-but-unselected, or something is still selected (<code>--clear-active-on-deselect</code> lands here)</td></tr></tbody></table></div>
85
-
<p>The <code>blender-smoke</code> workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the <code>needs-5.1</code> PR label, or manual dispatch). Smoke does not pass <code>--output</code>. Its catalog falsifiers are<code>--no-override</code> (expects exit 3) and <code>--clear-active-on-deselect</code>(exit 13).</p>
84
+
<divclass="table-wrap"><table><thead><tr><thscope="col">Code</th><thscope="col">Meaning</th></tr></thead><tbody><tr><td>0</td><td>Success</td></tr><tr><td>1</td><td>Uncaught exception (FATAL wrapper)</td></tr><tr><td>2</td><td>argparse / usage</td></tr><tr><td>3</td><td>Mesh object count after join ≠ 1 (<code>--no-override</code> lands here)</td></tr><tr><td>4</td><td>Joined target is not the sole remaining mesh</td></tr><tr><td>5</td><td>Verts / faces ≠ the sum over the seven parts</td></tr><tr><td>6</td><td>Source objects still present</td></tr><tr><td>7</td><td>Local Z span ≠ [0, 2.303]: a part transform was not applied</td></tr><tr><td>8</td><td>Material slots ≠ the five part materials, once each</td></tr><tr><td>9</td><td>Faces per material ≠ what the parts brought (indices not remapped)</td></tr><tr><td>10</td><td><code>--output</code> framing gate (<code>gallery_framing</code>)</td></tr><tr><td>11</td><td><code>--output</code> asset-quality floors (<code>gallery_asset_quality</code>)</td></tr><tr><td>12</td><td><code>--output</code> produced no file</td></tr><tr><td>13</td><td>After deselect-all the target is not still active-but-unselected, or something is still selected (the <code>--clear-active-on-deselect</code> self-check lands here)</td></tr></tbody></table></div>
85
+
<p>The <code>blender-smoke</code> workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the <code>needs-5.1</code> PR label, or manual dispatch). Smoke does not pass <code>--output</code>. Its catalog falsifier is<code>--no-override</code> (expects exit 3). <code>--clear-active-on-deselect</code>is not in the catalog: it reaches exit 13 only by writing the value the check reads, so it would pass whatever Blender did (#489).</p>
"13": "After deselect-all the target is not still active-but-unselected, or something is still selected (`--clear-active-on-deselect` lands here)"
1929
+
"13": "After deselect-all the target is not still active-but-unselected, or something is still selected (the `--clear-active-on-deselect` self-check lands here)"
| 13 | After deselect-all the target is not still active-but-unselected, or something is still selected (`--clear-active-on-deselect` lands here) |
79
+
| 13 | After deselect-all the target is not still active-but-unselected, or something is still selected (the `--clear-active-on-deselect` self-check lands here) |
80
80
81
81
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
82
82
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
0 commit comments