Skip to content

Commit 99e4b25

Browse files
TMHSDigitalclaude
andcommitted
fix: driver-wave presentation, a raised camera so the wave reads
Render path only: the camera looks down 18 degrees so the column tops and shadows read as a wave. Contract and exit codes unchanged on 4.5.11, 5.1.2 and 5.2.1. Also regenerates the gallery index for all four items. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
1 parent d9c5dd7 commit 99e4b25

9 files changed

Lines changed: 27 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ A slotted-actions Z-rotation turntable keyed through the cross-version channelba
645645
</tr>
646646
<tr>
647647
<td width="46%" valign="middle">
648-
<a href="examples/driver-wave/"><img src="examples/driver-wave/preview.webp" alt="Driver wave: sixteen orange columns whose heights form a sine skyline on a dark studio floor, each driven by a driver_namespace function" /></a>
648+
<a href="examples/driver-wave/"><img src="examples/driver-wave/preview.webp" alt="Driver wave: sixteen orange columns seen from above whose heights form a sine wave on a dark studio floor, each driven by a driver_namespace function" /></a>
649649
</td>
650650
<td valign="middle">
651651

8.34 KB
Loading
15.7 KB
Loading

‎docs/gallery/driver-wave/index.html‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
<meta property="og:image" content="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/assets/driver-wave-hero.webp" />
1717
<meta property="og:image:width" content="1280" />
1818
<meta property="og:image:height" content="720" />
19-
<meta property="og:image:alt" content="A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends." />
19+
<meta property="og:image:alt" content="A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor." />
2020
<meta property="og:site_name" content="Blender Developer Tools" />
2121
<meta name="twitter:card" content="summary_large_image" />
2222
<meta name="twitter:title" content="driver-wave — Examples — Blender Developer Tools" />
2323
<meta name="twitter:description" content="A driver_namespace function driving sixteen column heights through SCRIPTED drivers — the sine skyline is entirely driver-evaluated." />
2424
<meta name="twitter:image" content="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/assets/driver-wave-hero.webp" />
25-
<meta name="twitter:image:alt" content="A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends." />
25+
<meta name="twitter:image:alt" content="A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor." />
2626
<style>
2727
/* fonts are deployed by the landing build (docs/fonts/) */
2828
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap;
@@ -268,8 +268,8 @@ <h1>driver-wave</h1>
268268
<p>A driver_namespace function driving sixteen column heights through SCRIPTED drivers — the sine skyline is entirely driver-evaluated.</p>
269269
</header>
270270
<main id="main">
271-
<button class="detail-hero" id="heroZoom" type="button" aria-label="View full size: A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends.">
272-
<img src="../assets/driver-wave-hero.webp" alt="A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends." width="1280" height="720" />
271+
<button class="detail-hero" id="heroZoom" type="button" aria-label="View full size: A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor.">
272+
<img src="../assets/driver-wave-hero.webp" alt="A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor." width="1280" height="720" />
273273
</button>
274274
<p class="zoom-hint">Rendered headless by the example itself — click to zoom.</p>
275275
<div class="callout"><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.</div>
@@ -281,6 +281,8 @@ <h1>driver-wave</h1>
281281
<p>A runnable example that drives sixteen column heights from a custom function registered in <code>bpy.app.driver_namespace</code> — the pattern from <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/drivers-and-app-handlers/SKILL.md"><code>drivers-and-app-handlers</code></a>. Each column gets a SCRIPTED driver on Z scale whose expression calls <code>wave_scale(i)</code>, producing a sine skyline.</p>
282282
<p><strong>What it witnesses:</strong> the driver evaluation contract. Driven values appear only after a view-layer update, and they land in <strong>two</strong> places that must agree: the depsgraph-evaluated copy (<code>evaluated_get(dg).scale</code>) and the original datablock, which the animation system flushes for display. The check asserts both against the closed-form profile.</p>
283283
<p>Note for real add-ons: <code>driver_namespace</code> entries do <strong>not</strong> persist in <code>.blend</code> files — re-register them from a <code>load_post</code> handler, or every driver that calls them fails on file open. Headless, registering before driver creation (as here) is enough.</p>
284+
<h2>Staging</h2>
285+
<p>The camera is raised to look down about 18 degrees, so the column tops and their shadows read as a wave. From nearly level (86 degrees) the skyline flattened into a bar chart. Render path only.</p>
284286
<h2>Run</h2>
285287
<pre><code># Cheap correctness check (no render) — the CI check:
286288
blender --background --python driver_wave.py --
@@ -457,8 +459,10 @@ <h2>Source</h2>
457459
<span class="c"># the frame with a small margin -- the skyline must not clip</span>
458460
cam_data = bpy.data.cameras.new(<span class="s">&quot;Cam&quot;</span>); cam_data.lens = <span class="n">42.0</span>
459461
cam = bpy.data.objects.new(<span class="s">&quot;Cam&quot;</span>, cam_data)
460-
cam.location = (<span class="n">0.0</span>, -<span class="n">15.0</span>, <span class="n">2.0</span>)
461-
cam.rotation_euler = (math.radians(<span class="n">86</span>), <span class="n">0.0</span>, <span class="n">0.0</span>)
462+
<span class="c"># raised so the column tops and their shadows read as a wave; from</span>
463+
<span class="c"># nearly level (86 deg) it flattened into a bar chart</span>
464+
cam.location = (<span class="n">0.0</span>, -<span class="n">14.2</span>, <span class="n">5.6</span>)
465+
cam.rotation_euler = (math.radians(<span class="n">72</span>), <span class="n">0.0</span>, <span class="n">0.0</span>)
462466
scene.collection.objects.link(cam)
463467
scene.camera = cam
464468

@@ -528,7 +532,7 @@ <h2>Source</h2>
528532
</main>
529533
<dialog class="lightbox" id="lightbox" aria-label="Full-size render">
530534
<button class="lightbox-close" type="button" autofocus>Close</button>
531-
<img src="../assets/driver-wave-hero.webp" alt="A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends." />
535+
<img src="../assets/driver-wave-hero.webp" alt="A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor." />
532536
</dialog>
533537
<footer>
534538
<div class="statusbar">

‎docs/gallery/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ <h2><a href="wave-displace/">wave-displace</a></h2>
398398
</article>
399399
<article class="card" data-tags="drivers animation">
400400
<a class="card-media" href="driver-wave/" tabindex="-1" aria-hidden="true">
401-
<img src="assets/driver-wave-hero.webp" alt="A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends." loading="lazy" decoding="async" />
401+
<img src="assets/driver-wave-hero.webp" alt="A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor." loading="lazy" decoding="async" />
402402
</a>
403403
<div class="card-body">
404404
<h2><a href="driver-wave/">driver-wave</a></h2>
@@ -1069,12 +1069,12 @@ <h2><a href="water-trough/">water-trough</a></h2>
10691069
</article>
10701070
<article class="card" data-tags="mesh export showcase">
10711071
<a class="card-media" href="hitching-post/" tabindex="-1" aria-hidden="true">
1072-
<img src="assets/hitching-post-hero.webp" alt="A tall wooden hitching post with a pointed cap, a crossbar and two iron rings." loading="lazy" decoding="async" />
1072+
<img src="assets/hitching-post-hero.webp" alt="A tall wooden hitching post with a pointed cap, a crossbar, two iron bands wrapped around the post and two iron rings." loading="lazy" decoding="async" />
10731073
</a>
10741074
<div class="card-body">
10751075
<h2><a href="hitching-post/">hitching-post</a></h2>
10761076
<p class="teaches">A procedural hitching post (eaved cap, one rail, cup shoe, rings hung through eyes) through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.</p>
1077-
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 1680 tris, two materials with 114 wood and 742 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.500×0.149×1.246 m, zmin 0, hygiene and coplanar pairs 0, post seated at z 0.010, ring centerline error 0, LOD ratios in band, convex collider 80 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert and --twin-sole exit 15; --lift-z exits 16; --clip-ring exits 18; --short-post exits 19.</p>
1077+
<p class="witnesses"><span class="tag">witnesses</span> Recomputed: 1680 tris, two materials with 114 wood and 742 metal faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.500×0.149×1.246 m, zmin 0, hygiene and coplanar pairs 0, post seated at z 0.010, ring centerline error 0, bands 6.5 mm proud of the post, LOD ratios in band, convex collider 80 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert and --twin-sole exit 15; --lift-z exits 16; --clip-ring and --sunk-bands exit 18; --short-post exits 19.</p>
10781078
<a class="card-link" href="hitching-post/">View showcase piece<span class="sr-only"> hitching-post</span> <span aria-hidden="true">&rarr;</span></a>
10791079
</div>
10801080
</article>
@@ -1091,7 +1091,7 @@ <h2><a href="grindstone/">grindstone</a></h2>
10911091
</article>
10921092
<article class="card" data-tags="mesh export showcase">
10931093
<a class="card-media" href="hand-pump/" tabindex="-1" aria-hidden="true">
1094-
<img src="assets/hand-pump-hero.webp" alt="A dark iron village hand pump with a curved spout and lever handle on a square wooden plinth." loading="lazy" decoding="async" />
1094+
<img src="assets/hand-pump-hero.webp" alt="A matte black cast-iron village hand pump with a curved spout and lever handle on a stepped wooden plinth." loading="lazy" decoding="async" />
10951095
</a>
10961096
<div class="card-body">
10971097
<h2><a href="hand-pump/">hand-pump</a></h2>

‎examples/driver-wave/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Note for real add-ons: `driver_namespace` entries do **not** persist in `.blend`
1515
re-register them from a `load_post` handler, or every driver that calls them fails on file
1616
open. Headless, registering before driver creation (as here) is enough.
1717

18+
## Staging
19+
20+
The camera is raised to look down about 18 degrees, so the column tops
21+
and their shadows read as a wave. From nearly level (86 degrees) the
22+
skyline flattened into a bar chart. Render path only.
23+
1824
## Run
1925

2026
```bash

‎examples/driver-wave/driver_wave.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ def render_still(objs, path, engine):
153153
# the frame with a small margin -- the skyline must not clip
154154
cam_data = bpy.data.cameras.new("Cam"); cam_data.lens = 42.0
155155
cam = bpy.data.objects.new("Cam", cam_data)
156-
cam.location = (0.0, -15.0, 2.0)
157-
cam.rotation_euler = (math.radians(86), 0.0, 0.0)
156+
# raised so the column tops and their shadows read as a wave; from
157+
# nearly level (86 deg) it flattened into a bar chart
158+
cam.location = (0.0, -14.2, 5.6)
159+
cam.rotation_euler = (math.radians(72), 0.0, 0.0)
158160
scene.collection.objects.link(cam)
159161
scene.camera = cam
160162

‎examples/driver-wave/preview.webp‎

7.35 KB
Loading

‎examples/gallery.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"name": "driver-wave",
7474
"dir": "examples/driver-wave",
7575
"teaches": "A driver_namespace function driving sixteen column heights through SCRIPTED drivers — the sine skyline is entirely driver-evaluated.",
76-
"alt": "A row of orange bars whose heights rise and fall in a wave, low in the middle and tall at both ends.",
76+
"alt": "A row of orange bars seen from above, their heights rising and falling in a wave, low in the middle and tall at both ends, each casting a shadow on the floor.",
7777
"witnessesFix": "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.",
7878
"hero": "docs/gallery/assets/driver-wave-hero.webp",
7979
"preview": "examples/driver-wave/preview.webp",

0 commit comments

Comments
 (0)