Skip to content

Commit 3cde3ae

Browse files
TMHSDigitalclaude
andcommitted
feat: two new smoke-gated examples — wave-displace and driver-wave
wave-displace witnesses bulk vertex IO at real scale: a 96x96 grid (9,409 verts) displaced into a standing wave with one foreach_get and one foreach_set. The check asserts count unchanged, Z span matches the amplitude, and a probe vertex matches the closed form. driver-wave witnesses the driver evaluation contract: a driver_namespace function drives sixteen column heights through SCRIPTED drivers; driven values must appear after a view-layer update on BOTH the evaluated copy and the flushed-back original. (The first draft asserted the original stays untouched — real Blender flushes driven values back for display; the example now teaches the true model.) Both run headless on Blender 4.4/5.1 locally and are wired into the blender-smoke workflow for 4.5 LTS + 5.1. Each ships a README, a CI-artifact hero and preview render, gallery.json + manifest entries, and a README gallery row. Gallery grows to 6 examples with new drivers/mesh/performance filter chips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6b822a3 commit 3cde3ae

15 files changed

Lines changed: 1284 additions & 1 deletion

File tree

.cursor-plugin/plugin.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060
],
6161
"examples": [
6262
"examples/depsgraph-export",
63+
"examples/driver-wave",
6364
"examples/gn-sdf-remesh",
6465
"examples/swatch-grid",
65-
"examples/turntable"
66+
"examples/turntable",
67+
"examples/wave-displace"
6668
]
6769
}

.github/workflows/blender-smoke.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,23 @@ jobs:
155155
# > base. Exits non-zero on failure.
156156
xvfb-run -a "$BLENDER" --background \
157157
--python examples/depsgraph-export/depsgraph_export.py --
158+
159+
- name: Shipped example - wave displace (foreach bulk IO)
160+
run: |
161+
set -euo pipefail
162+
# Frame-independent check only (no render): 9409 verts displaced via one
163+
# foreach_get + one foreach_set; asserts count unchanged, Z span matches the
164+
# amplitude, and a probe vertex matches the closed-form wave. Exits non-zero
165+
# on failure.
166+
xvfb-run -a "$BLENDER" --background \
167+
--python examples/wave-displace/wave_displace.py --
168+
169+
- name: Shipped example - driver wave (driver_namespace + depsgraph)
170+
run: |
171+
set -euo pipefail
172+
# Frame-independent check only (no render): sixteen SCRIPTED drivers call a
173+
# driver_namespace function; asserts the driven values on the evaluated copy
174+
# AND the flushed-back original both match the closed form. Exits non-zero
175+
# on failure.
176+
xvfb-run -a "$BLENDER" --background \
177+
--python examples/driver-wave/driver_wave.py --

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,34 @@ A depsgraph-evaluated export — builds a cube with `SUBSURF`, measures the eval
105105
`evaluated_get().to_mesh()` / `to_mesh_clear()`, and asserts `wm.obj_export` ships the
106106
modifier-applied geometry (exported vertex count == evaluated > base).
107107

108+
</td>
109+
</tr>
110+
<tr>
111+
<td width="46%" valign="middle">
112+
<a href="examples/wave-displace/"><img src="examples/wave-displace/preview.webp" alt="Wave displace: a dense grid displaced into smooth standing-wave dunes, rendered with EEVEE" /></a>
113+
</td>
114+
<td valign="middle">
115+
116+
### [wave-displace](examples/wave-displace/)
117+
118+
Bulk vertex IO at real scale — 9,409 vertices displaced into a standing wave with **one
119+
`foreach_get` and one `foreach_set`**, no per-vertex access. Asserts the count is unchanged,
120+
the Z span matches the amplitude, and a probe vertex matches the closed-form wave.
121+
122+
</td>
123+
</tr>
124+
<tr>
125+
<td width="46%" valign="middle">
126+
<a href="examples/driver-wave/"><img src="examples/driver-wave/preview.webp" alt="Driver wave: sixteen columns whose heights form a sine skyline, each driven by a driver_namespace function, rendered with EEVEE" /></a>
127+
</td>
128+
<td valign="middle">
129+
130+
### [driver-wave](examples/driver-wave/)
131+
132+
A `driver_namespace` function driving sixteen column heights through SCRIPTED drivers.
133+
Witnesses the evaluation contract: driven values appear after a view-layer update on the
134+
evaluated copy **and** the flushed-back original, and both must match the closed form.
135+
108136
</td>
109137
</tr>
110138
</table>
9.81 KB
Loading
9.81 KB
Loading

docs/gallery/driver-wave/index.html

Lines changed: 417 additions & 0 deletions
Large diffs are not rendered by default.

docs/gallery/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,12 @@ <h1>Examples Gallery</h1>
176176
<button class="chip active" data-tag="" type="button">All</button>
177177
<button class="chip" data-tag="animation" type="button">animation</button>
178178
<button class="chip" data-tag="depsgraph" type="button">depsgraph</button>
179+
<button class="chip" data-tag="drivers" type="button">drivers</button>
179180
<button class="chip" data-tag="export" type="button">export</button>
180181
<button class="chip" data-tag="geometry-nodes" type="button">geometry-nodes</button>
181182
<button class="chip" data-tag="materials" type="button">materials</button>
183+
<button class="chip" data-tag="mesh" type="button">mesh</button>
184+
<button class="chip" data-tag="performance" type="button">performance</button>
182185
<button class="chip" data-tag="rendering" type="button">rendering</button>
183186
</div>
184187
<main id="main">
@@ -227,6 +230,28 @@ <h2><a href="depsgraph-export/">depsgraph-export</a></h2>
227230
<a class="card-link" href="depsgraph-export/">View example <span aria-hidden="true">&rarr;</span></a>
228231
</div>
229232
</article>
233+
<article class="card" data-tags="mesh performance">
234+
<a class="card-media" href="wave-displace/" aria-label="wave-displace example detail page">
235+
<img src="assets/wave-displace-hero.webp" alt="wave-displace — Bulk vertex IO at real scale — 9,409 vertices displaced into a standing wave with one foreach_get and one foreach_set, no per-vertex access" loading="lazy" decoding="async" />
236+
</a>
237+
<div class="card-body">
238+
<h2><a href="wave-displace/">wave-displace</a></h2>
239+
<p class="teaches">Bulk vertex IO at real scale — 9,409 vertices displaced into a standing wave with one foreach_get and one foreach_set, no per-vertex access.</p>
240+
<p class="witnesses"><span class="tag">witnesses</span> The bulk path is correct, not just fast: vertex count unchanged, Z span matches the wave amplitude, probe vertex matches the closed form exactly.</p>
241+
<a class="card-link" href="wave-displace/">View example <span aria-hidden="true">&rarr;</span></a>
242+
</div>
243+
</article>
244+
<article class="card" data-tags="drivers animation">
245+
<a class="card-media" href="driver-wave/" aria-label="driver-wave example detail page">
246+
<img src="assets/driver-wave-hero.webp" alt="driver-wave — A driver_namespace function driving sixteen column heights through SCRIPTED drivers — the sine skyline is entirely driver-evaluated" loading="lazy" decoding="async" />
247+
</a>
248+
<div class="card-body">
249+
<h2><a href="driver-wave/">driver-wave</a></h2>
250+
<p class="teaches">A driver_namespace function driving sixteen column heights through SCRIPTED drivers — the sine skyline is entirely driver-evaluated.</p>
251+
<p class="witnesses"><span class="tag">witnesses</span> Driven values appear after a view-layer update in two places that must agree: the evaluated copy and the original datablock the animation system flushes for display.</p>
252+
<a class="card-link" href="driver-wave/">View example <span aria-hidden="true">&rarr;</span></a>
253+
</div>
254+
</article>
230255
</div>
231256
</main>
232257
<footer>

0 commit comments

Comments
 (0)