feat: add vse-cut-list example witnessing the 4.5-to-5.x sequencer API rename#73
Merged
Merged
Conversation
…I 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ships
examples/vse-cut-list/— the gallery's first sequencer example and the ROADMAP pool's "VSE sequences-to-strips witness" (pool entry removed, two newly identified candidates restocked). It witnesses the 4.5 LTS → 5.x sequencer API rename, the single most common way AI-generated VSE code dies on a modern Blender: every tutorial-era snippet doessequence_editor.sequences.new_effect(..., frame_end=...), and on 5.x that path is gone twice over.API contracts witnessed
sequence_editor.sequencesraises AttributeError, only.stripsexists. 4.5: both accessors exist and see the same strips (transition bridge asserted).strips.new_effect(...)ends a strip withframe_end=on 4.5,length=on 5.x; the wrong kwarg raises TypeError on each side (asserted, not assumed). 5.x also rejects the removedTRANSFORMeffect type; per-stripstrip.transformis the cross-version placement API.frame_final_*on 4.5;left_handle/right_handle/durationon 5.x, whereframe_final_*is deprecated (removal announced for 6.0) and asserted still equal, with the RNAis_deprecatedflag checked per side.input_1/input_2(notinput1) on both versions, authored order, cross clamped to exactly the source overlap.new_scene(...)on both; default span == source scene frame range; sources a separate Stage scene.save_as_mainfile→open_mainfile.--check-pixels) — 96×54 render: cell centers carry strip colors (tol 0.1), cross cell is a true mid blend (strictly between sources per channel), margin matches neither cross source.Hazards discovered while authoring (witnessed in code + README)
bpy_prop_collectionis falsy —se.strips or se.sequencessilently picks the legacy accessor on an empty timeline.Falsification evidence (break-the-contract probes, all on the shipped script)
se.sequences.new_effect(frame_end=...)on 5.1.1AttributeError: 'SequenceEditor' object has no attribute 'sequences'new_effect(frame_end=9)on 5.1.1 (guarded assert)TypeError ... expected (name, type, channel, frame_start, length, input1, input2)GC span (25, 33, 8) != closed form (25, 34, 9)(also on 4.5.11)inputs=(T2, T1), expected T1 -> T2Measured check values (CI logs carry these)
accessor: strips only (.sequences removed); end kwarg: length; spans A(1,33) B(25,57) C(1,57) GC(25,33) SC(1,251) on left_handle/right_handle/duration; GC input_1=T1 input_2=T2 clamped; transforms tol 1e-03; all survive save/reloadframe_final_*,.sequences bridged to .strips,frame_endTL(0.851,0.102,0.22) TR(0.059,0.749,0.8) BL(0.949,0.62,0.102) BR(blend)(0.341,0.349,0.463) margin(0.318,0.314,0.322)Visuals
The still is the sequencer's own output at frame 29 (mid cross): crimson/teal/amber program cells + the 50/50 cross-blend cell over the Stage scene strip (dark studio, warm wedge pool), caption carrying the closed form. An off-by-one in end-exclusive span math drops its cell to the dark stage.
Contact sheet (candidate leftmost, then the pinned calibration set):
docs/gallery/contact-sheets/vse-cut-list-contact-sheet.webpPer-criterion verdicts vs
armature-bend/damped-track-aim/bmesh-gear:Test plan
C:\Program Files\Blender Foundation\Blender 5.1\blender.exe(5.1.1, self-reported) and.scratch/blender-4.5.11-windows-x64/blender.exe(4.5.11 LTS, self-reported, official download).--check-pixels --engine cycles(exit 0),--outputhero render (EEVEE on 5.1.1 GPU host; parity render on 4.5.11).blender-smoke4.5/5.1 run both the check and the pixel witness (Cycles CPU).Proven by live run vs inspection only