Skip to content

Commit 6566877

Browse files
committed
feat: add vse-cut-list example witnessing the 4.5-to-5.x sequencer API rename
AI-generated VSE code still targets the pre-rename API everywhere: sequence_editor.sequences is gone on 5.x, new_effect ends strips with length= there but frame_end= on 4.5, and frame_final_* reads are deprecated aliases for left_handle/right_handle/duration. No existing example covers the sequencer, so this drift had no smoke-gated witness. The example builds a deterministic cut list (color programs, a clamped GAMMA_CROSS fed by a dedicated source pair, a scene strip, a text strip), asserts every span against its closed form on each version's canonical accessors, and re-asserts after a save/reload round-trip. A --check-pixels mode witnesses the compositing contract on a tiny render. Hazards found while authoring are witnessed too: the cross clamps to the source overlap, effect strips consume their inputs only when stacked above them, and a same-scene scene strip renders transparent. Runs check-only on 4.5 LTS and 5.1 in blender-smoke; the render is the sequencer's own output staged in the dark studio per VISUAL-STYLE, gated against the pinned contact-sheet set. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
1 parent 1420eb5 commit 6566877

14 files changed

Lines changed: 1486 additions & 8 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"examples/text-version-stamp",
8181
"examples/turntable",
8282
"examples/uv-layer-grid",
83+
"examples/vse-cut-list",
8384
"examples/wave-displace"
8485
]
8586
}

.github/workflows/blender-smoke.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,3 +350,22 @@ jobs:
350350
# non-zero on failure.
351351
xvfb-run -a "$BLENDER" --background \
352352
--python examples/png-exr-alpha/png_exr_alpha.py --
353+
354+
- name: Shipped example - vse cut list (sequencer 4.5 vs 5.x rename)
355+
run: |
356+
set -euo pipefail
357+
# Check only (no render): asserts the accessor rename (.sequences
358+
# gone on 5.x, bridged on 4.5), the new_effect end-kwarg rename
359+
# (frame_end on 4.5, length on 5.x — the wrong kwarg TypeErrors),
360+
# closed-form spans on each version's canonical accessors
361+
# (frame_final_* vs left_handle/right_handle/duration with the
362+
# deprecation bridge), GC wiring and clamping, scene-strip span,
363+
# and a save/reload round-trip. Exits non-zero on failure.
364+
xvfb-run -a "$BLENDER" --background \
365+
--python examples/vse-cut-list/vse_cut_list.py --
366+
# Compositing witness on a tiny Cycles render: mosaic cells carry
367+
# their strip colors, the cross cell is a true mid blend, and a
368+
# consumed cross source never composites independently.
369+
xvfb-run -a "$BLENDER" --background \
370+
--python examples/vse-cut-list/vse_cut_list.py -- \
371+
--check-pixels --engine cycles

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ a `.cursor-plugin/plugin.json` manifest so the ecosystem drift checker
2020
classifies it as a `cursor-plugin`. This is content the AI loads when the user
2121
asks Blender questions or works on Blender add-ons in Cursor or Claude Code.
2222

23-
The content base is 12 skills, 6 rules, 2 templates, 17 snippets, and 22
23+
The content base is 12 skills, 6 rules, 2 templates, 17 snippets, and 23
2424
examples (counts are CI-enforced against README.md and the manifest). The full
2525
inventory tables and per-item purposes live in `CLAUDE.md`. Example anatomy
2626
and authoring rules: copy `examples/bmesh-gear/`; the render look is specified
@@ -35,7 +35,7 @@ Blender-Developer-Tools/
3535
rules/<rule-name>.mdc # 6 rule files
3636
templates/<template-name>/ # 2 starter templates
3737
snippets/<snippet-name>.py # 17 standalone Python snippets
38-
examples/<name>/ # 22 runnable smoke-gated examples (+ gallery.json)
38+
examples/<name>/ # 23 runnable smoke-gated examples (+ gallery.json)
3939
scripts/build_gallery.py # generates docs/gallery/ (stdlib only)
4040
scripts/site/ # vendored landing-page build (build_site.py + template)
4141
docs/gallery/ # committed generated gallery pages + hero assets

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ skills/<skill-name>/SKILL.md - AI workflow definitions, 12 total
2121
rules/<rule-name>.mdc - Anti-pattern rules, 6 total
2222
templates/<template-name>/ - Starter projects, 2 total
2323
snippets/<snippet-name>.py - Standalone code patterns, 17 total
24-
examples/<name>/ - Runnable smoke-gated examples, 22 total (+ gallery.json)
24+
examples/<name>/ - Runnable smoke-gated examples, 23 total (+ gallery.json)
2525
scripts/build_gallery.py - Regenerates docs/gallery/ from gallery.json (stdlib only)
2626
scripts/site/ - Vendored landing-page build (Jinja2)
2727
docs/gallery/ - Committed generated gallery pages + hero renders
@@ -82,11 +82,11 @@ v0.1.0: canonical object creation and deletion, depsgraph evaluated mesh, bmesh
8282

8383
v0.2.0: Principled BSDF material, driver-with-custom-function via `driver_namespace`, application handler registration, shader node group with cross-version `interface` API, `foreach_get` bulk vertex read, version-branch skeleton, and USD export with `evaluation_mode='RENDER'`.
8484

85-
## Examples (22)
85+
## Examples (23)
8686

8787
Runnable scripts at `examples/<name>/`, each asserting a real API contract with
8888
deterministic checks (exit non-zero on failure) and optionally rendering a still via
89-
`--output`. All twenty-two run headless on Blender 4.5 LTS and 5.1 in `blender-smoke.yml`;
89+
`--output`. All twenty-three run headless on Blender 4.5 LTS and 5.1 in `blender-smoke.yml`;
9090
their renders ship in the site gallery at `docs/gallery/`. `examples/gallery.json` is the
9191
gallery's source of truth. When authoring a new one, copy the anatomy of
9292
`examples/bmesh-gear/` (script structure, README shape, dark-studio render recipe) and

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</p>
1919

2020
<p align="center">
21-
<strong>12 skills</strong> &nbsp;&bull;&nbsp; <strong>6 rules</strong> &nbsp;&bull;&nbsp; <strong>2 templates</strong> &nbsp;&bull;&nbsp; <strong>17 snippets</strong> &nbsp;&bull;&nbsp; <strong>22 examples</strong>
21+
<strong>12 skills</strong> &nbsp;&bull;&nbsp; <strong>6 rules</strong> &nbsp;&bull;&nbsp; <strong>2 templates</strong> &nbsp;&bull;&nbsp; <strong>17 snippets</strong> &nbsp;&bull;&nbsp; <strong>23 examples</strong>
2222
</p>
2323

2424
<p align="center">
@@ -285,6 +285,21 @@ A depsgraph-evaluated export — builds a cube with `SUBSURF`, measures the eval
285285
`evaluated_get().to_mesh()` / `to_mesh_clear()`, and asserts `wm.obj_export` ships the
286286
modifier-applied geometry (exported vertex count == evaluated > base).
287287

288+
</td>
289+
</tr>
290+
<tr>
291+
<td width="46%" valign="middle">
292+
<a href="examples/vse-cut-list/"><img src="examples/vse-cut-list/preview.webp" alt="VSE cut list: a two-by-two program wall in a dark studio — crimson, teal, and amber color strips plus the mid cross-blend cell, composited by the sequencer over a scene strip, with the span caption below" /></a>
293+
</td>
294+
<td valign="middle">
295+
296+
### [vse-cut-list](examples/vse-cut-list/)
297+
298+
The sequencer API rename from 4.5 LTS to 5.x — `strips` (never `.sequences`), `new_effect`
299+
ending in `length=` vs `frame_end=`, and `left_handle`/`right_handle`/`duration` replacing
300+
the deprecated `frame_final_*`. Asserts closed-form spans, GC wiring and clamping, the
301+
consumed-input compositing contract, and a save/reload round-trip.
302+
288303
</td>
289304
</tr>
290305
</table>

ROADMAP.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo
9797
- Refresh the `slotted-actions-animation` skill against any 5.2 changes
9898
- Bump `blender_version_min` in the templates if 5.2 APIs are used
9999
- Additional snippets for asset library scripting, EXR baking, multi-file extensions
100-
- Gallery coverage follow-ups from the GPv3 review: light-linking, VSE sequences-to-strips witness (`grease-pencil-rosette`, `armature-bend`, `text-version-stamp`, and `image-pixels-testcard` shipped first)
100+
- Gallery coverage follow-ups from the GPv3 review: light-linking (`grease-pencil-rosette`, `armature-bend`, `text-version-stamp`, `image-pixels-testcard`, and `vse-cut-list` shipped first)
101101
- ~~UV-layer authoring witness~~ **SHIPPED** as `examples/uv-layer-grid/``create_grid(..., calc_uvs=True)` silent no-op without a pre-existing UV layer; closed-form UV fill + explicit assignment fallback; dual-panel render (flat texel (0,0) vs neon checker)
102102
- ~~Image save-format witness~~ **SHIPPED** as `examples/png-exr-alpha/` — float→PNG is RGBA16 and false-unpremultiplies as if associated-alpha (closed-form err 0.98 at RGB 0.02 / a=1/255); OpenEXR preserves float RGBA; byte→PNG is straight RGBA8; `EXR color_mode='RGB'` drops alpha
103103
- 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`
104104
- Light-linking collection witness: object light linking / receiver collections so a key illuminates only the hero (common AI miss when staging multi-light studios)
105-
- VSE sequences-to-strips witness: building a short cut list from `sequences.new_effect` / movie strips and asserting frame ranges survive reload
105+
- ~~VSE sequences-to-strips witness~~ **SHIPPED** as `examples/vse-cut-list/``.sequences` removed on 5.x (4.5 bridges to `.strips`), `new_effect` end kwarg `frame_end=` (4.5) vs `length=` (5.x), `frame_final_*` deprecated in favor of `left_handle`/`right_handle`/`duration`, TRANSFORM effect type removed, GAMMA_CROSS clamps to the source overlap, effect strips consume inputs only when stacked above them, same-scene scene strips render transparent; save/reload round-trip + tiny-render pixel witness
106+
- GAMMA_CROSS blend-curve witness: the cross blend is not the naive linear mix (mid-cross measured (0.341, 0.349, 0.463) from crimson (0.85, 0.10, 0.22) and teal (0.06, 0.75, 0.80)) — derive and assert the gamma-space closed form per frame; follow-up to `vse-cut-list`
107+
- Falsy `bpy_prop_collection` trap snippet: an empty collection is falsy, so `editor.strips or editor.sequences` silently falls through to the legacy accessor on an empty timeline — always branch on `hasattr`; likely generalizes across the API (found authoring `vse-cut-list`)
106108

107109
## Future (uncommitted)
108110

13.1 KB
Loading
42.2 KB
Loading

docs/gallery/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ <h1>Examples Gallery</h1>
198198
<button class="chip" data-tag="operators" type="button">operators</button>
199199
<button class="chip" data-tag="performance" type="button">performance</button>
200200
<button class="chip" data-tag="rendering" type="button">rendering</button>
201+
<button class="chip" data-tag="sequencer" type="button">sequencer</button>
201202
<button class="chip" data-tag="shape-keys" type="button">shape-keys</button>
202203
<button class="chip" data-tag="transforms" type="button">transforms</button>
203204
<button class="chip" data-tag="uv" type="button">uv</button>
@@ -446,6 +447,17 @@ <h2><a href="uv-layer-grid/">uv-layer-grid</a></h2>
446447
<a class="card-link" href="uv-layer-grid/">View example <span aria-hidden="true">&rarr;</span></a>
447448
</div>
448449
</article>
450+
<article class="card" data-tags="sequencer rendering">
451+
<a class="card-media" href="vse-cut-list/" aria-label="vse-cut-list example detail page">
452+
<img src="assets/vse-cut-list-hero.webp" alt="vse-cut-list — The sequencer API rename from 4.5 LTS to 5.x — strips (never .sequences), new_effect ending in length= vs frame_end=, and left_handle/right_handle/duration…" loading="lazy" decoding="async" />
453+
</a>
454+
<div class="card-body">
455+
<h2><a href="vse-cut-list/">vse-cut-list</a></h2>
456+
<p class="teaches">The sequencer API rename from 4.5 LTS to 5.x — strips (never .sequences), new_effect ending in length= vs frame_end=, and left_handle/right_handle/duration replacing the deprecated frame_final_*. A deterministic cut list — color programs, a clamped GAMMA_CROSS, a scene strip, a text strip — asserted before and after save/reload.</p>
457+
<p class="witnesses"><span class="tag">witnesses</span> Each side hard-fails the other&#x27;s spelling: TypeError on the wrong end kwarg, AttributeError on .sequences. The cross clamps to the source overlap, effect strips consume their inputs only when stacked above them, and a same-scene scene strip renders transparent.</p>
458+
<a class="card-link" href="vse-cut-list/">View example <span aria-hidden="true">&rarr;</span></a>
459+
</div>
460+
</article>
449461
</div>
450462
</main>
451463
<footer>

0 commit comments

Comments
 (0)