Skip to content

Commit c4714a7

Browse files
feat: add CLI falsifiers and exit tables to the remaining twelve examples (#144)
* feat: add CLI falsifiers and exit tables to the remaining twelve examples Closes the last behavior gap in the retrofit: every example now has a flag that makes an existing assertion fail, without touching Grease Pencil version shims or changing any exit code value. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * docs: backfill README exit tables on the remaining thirteen examples Inspection-only documentation so every shipped example lists its file-local nonzero codes. No flags, no behavior, no code-value changes. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> --------- Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 06edfe3 commit c4714a7

37 files changed

Lines changed: 735 additions & 117 deletions

File tree

examples/coincident-vert-weld/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,20 @@ blender --background --python coincident_vert_weld.py --
3333
blender --background --python coincident_vert_weld.py -- --no-duplicate
3434
blender --background --python coincident_vert_weld.py -- --weld
3535
```
36+
37+
## Exit codes
38+
39+
Per-script sequential checks. `9` is a valid check code; there is no rule
40+
against it.
41+
42+
| Code | Meaning |
43+
| --- | --- |
44+
| 0 | Success |
45+
| 1 | Uncaught exception (FATAL wrapper) |
46+
| 2 | argparse / usage; also exporter RNA missing expected glTF kwargs |
47+
| 3 | Pathology missing: coincident shells (`--no-duplicate` lands here) |
48+
| 4 | glTF export handling failed (`--weld` lands here) |
49+
50+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
51+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
52+
Smoke does not pass `--no-duplicate` or `--weld`.

examples/compositor-glare/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,29 @@ absence of any EEVEE bloom toggle.
2929
# Cheap correctness check (two tiny renders) — the CI check:
3030
blender --background --python compositor_glare.py --
3131

32+
# Falsifier: Threshold=10.0. Must exit non-zero (Threshold==1.0).
33+
blender --background --python compositor_glare.py -- --threshold-high
34+
3235
# Also render a still (EEVEE on a GPU host; use --engine cycles on GPU-less hosts):
3336
blender --background --python compositor_glare.py -- --output rings.png
3437
blender --background --python compositor_glare.py -- --output rings.png --engine cycles
3538
```
3639

37-
It exits non-zero on failure (wrong tree plumbing, wrong Glare configuration, a
38-
missing or non-falling halo, or halo pixels that appear without the compositor).
39-
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS.
40+
## Exit codes
41+
42+
Per-script sequential checks. `9` is a valid check code; there is no rule
43+
against it.
44+
45+
| Code | Meaning |
46+
| --- | --- |
47+
| 0 | Success |
48+
| 1 | Uncaught exception (FATAL wrapper) |
49+
| 2 | argparse / usage |
50+
| 3 | Compositor tree / Glare / Threshold / link-chain contract (`--threshold-high` lands here) |
51+
| 4 | Check render missing, tube dark, no halo, or halo does not fall off |
52+
| 5 | Halo present with compositing off |
53+
| 6 | `--output` produced no file |
54+
55+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
56+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
57+
Smoke does not pass `--output` or `--threshold-high`.

examples/compositor-glare/compositor_glare.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@
1717
the ring silhouette, falls off strictly with distance, and vanishes entirely
1818
when `scene.render.use_compositing` is off.
1919
20+
``--threshold-high`` sets the shared ``Threshold`` input to 10.0 and still
21+
asserts it equals 1.0. That is the falsifier (``--same-axis`` in
22+
export-preset-axis). The 4.x/5.x Type-menu shim is untouched.
23+
2024
By default it runs only the correctness check (two 96x54 single-sample Cycles
2125
renders, compositor on vs off) — the CI smoke check. Pass --output to also
2226
render a still:
2327
24-
blender --background --python compositor_glare.py -- # check only
25-
blender --background --python compositor_glare.py -- --output n.png # + render
28+
blender --background --python compositor_glare.py -- # check only
29+
blender --background --python compositor_glare.py -- --threshold-high # must fail
30+
blender --background --python compositor_glare.py -- --output n.png # + render
2631
"""
2732
import bpy
2833
import sys
@@ -337,9 +342,14 @@ def main():
337342
help="render engine for --output (cycles for GPU-less hosts)")
338343
p.add_argument("--samples", type=int, default=32, help="--output sample count")
339344
p.add_argument("--width", type=int, default=1280, help="--output width; height is width*9/16")
345+
p.add_argument("--threshold-high", action="store_true",
346+
help="falsifier: Threshold=10.0, still assert Threshold==1.0")
340347
args = p.parse_args(argv)
341348

342349
scene, tree, glare = build_scene()
350+
if args.threshold_high:
351+
glare.inputs['Threshold'].default_value = 10.0
352+
343353
code = check_structure(scene, tree, glare)
344354
if code:
345355
return code

examples/cross-version-property-delete/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,25 @@ the Clear plate tagged and exit 7.
3636

3737
The `--output` render path measures framing against the Layer 1 band via
3838
`examples/gallery_framing.py` (exit 10 on violation) before writing the still.
39+
40+
## Exit codes
41+
42+
Per-script sequential checks. `9` is a valid check code; there is no rule
43+
against it. `10` is the shared framing helper.
44+
45+
| Code | Meaning |
46+
| --- | --- |
47+
| 0 | Success |
48+
| 1 | Uncaught exception (FATAL wrapper) |
49+
| 2 | argparse / usage; also an active object existed after the data-API build |
50+
| 3 | Custom ID property did not land |
51+
| 4 | `property_unset` on a custom ID key did not TypeError, or it deleted the key |
52+
| 5 | `del` did not report removal |
53+
| 6 | Keep plate lost the ID property |
54+
| 7 | Clear plate still has the ID property (`--skip-delete` / `--unset-instead` land here) |
55+
| 10 | Gallery framing violation |
56+
| 12 | `--output` produced no file |
57+
58+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
59+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
60+
Smoke does not pass `--output`, `--skip-delete`, or `--unset-instead`.

examples/curve-bevel-arc/README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,34 @@ and that the depsgraph-evaluated mesh has the deterministic topology (1044 verts
1717
# Cheap correctness check (no render) — the CI check:
1818
blender --background --python curve_bevel_arc.py --
1919

20+
# Falsifier: uncapped tube. Must exit non-zero (use_fill_caps).
21+
blender --background --python curve_bevel_arc.py -- --no-caps
22+
2023
# Also render a still (EEVEE on a GPU host; use --engine cycles on GPU-less hosts):
2124
blender --background --python curve_bevel_arc.py -- --output arc.png
2225
blender --background --python curve_bevel_arc.py -- --output arc.png --engine cycles
2326
```
2427

25-
It exits non-zero on failure (wrong point count, bevel, caps, topology, or span).
26-
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS.
28+
## Exit codes
29+
30+
Per-script sequential checks. `9` is a valid check code; there is no rule
31+
against it. `10` is also the shared framing helper.
32+
33+
| Code | Meaning |
34+
| --- | --- |
35+
| 0 | Success |
36+
| 1 | Uncaught exception (FATAL wrapper) |
37+
| 2 | argparse / usage |
38+
| 3 | Spline type is not BEZIER |
39+
| 4 | Bezier point count ≠ 8 |
40+
| 5 | `bevel_depth` ≠ 0.15 |
41+
| 6 | `use_fill_caps` is False (`--no-caps` lands here) |
42+
| 7 | Evaluated vert/face count off measured tessellation |
43+
| 8 | Tube does not rest on the floor |
44+
| 9 | Tube height ≠ 2 × bevel |
45+
| 10 | X span off closed form; also gallery framing violation |
46+
| 11 | `--output` produced no file |
2747

28-
The `--output` render path additionally measures framing against the Layer 1 band via `examples/gallery_framing.py` (exit 10 on violation) before writing the still.
48+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
49+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
50+
Smoke does not pass `--output` or `--no-caps`.

examples/curve-bevel-arc/curve_bevel_arc.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
has no simple closed form, so those two constants pin today's behavior (see
1010
EXPECT_VERTS below for how to re-measure if a future Blender retessellates).
1111
12+
``--no-caps`` leaves ``use_fill_caps`` False and still asserts the ends are
13+
capped. That is the falsifier (``--same-axis`` in export-preset-axis).
14+
1215
By default it runs only the correctness check (no render) — the CI smoke
1316
check. Pass --output to also render a still:
1417
1518
blender --background --python curve_bevel_arc.py -- # check only
19+
blender --background --python curve_bevel_arc.py -- --no-caps # must fail
1620
blender --background --python curve_bevel_arc.py -- --output c.png # + render
1721
"""
1822
import bpy, bmesh, sys, os, math, argparse
@@ -35,14 +39,15 @@
3539
EXPECT_FACES = 1028
3640

3741

38-
def build():
42+
def build(no_caps=False):
3943
bpy.ops.wm.read_factory_settings(use_empty=True)
4044
curve = bpy.data.curves.new("Arc", 'CURVE')
4145
curve.dimensions = '3D'
4246
curve.bevel_depth = BEVEL
4347
curve.bevel_resolution = BEVEL_RES
4448
curve.resolution_u = RES_U
45-
curve.use_fill_caps = True # solid ends — not a hollow pipe
49+
curve.use_fill_caps = not no_caps # solid ends — not a hollow pipe
50+
4651

4752
spline = curve.splines.new('BEZIER')
4853
spline.bezier_points.add(N_POINTS - 1) # one point exists already
@@ -231,9 +236,12 @@ def main():
231236
p.add_argument("--output", default=None, help="optional: render a still PNG here")
232237
p.add_argument("--engine", default="eevee", choices=("eevee", "cycles"),
233238
help="render engine for --output (cycles for GPU-less hosts)")
239+
p.add_argument("--no-caps", action="store_true",
240+
help="falsifier: use_fill_caps=False, still assert caps")
234241
args = p.parse_args(argv)
235242

236-
obj = build()
243+
obj = build(no_caps=args.no_caps)
244+
237245
code = check(obj)
238246
if code:
239247
return code

examples/exit-pre-sidecar/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ accessing the handler list.
1212

1313
No gallery still. There is no geometry.
1414

15-
**What failure each check would catch:**
16-
17-
- exit 77 — Blender &lt; 5.1 and not `--force-run`
18-
- exit 2 — `--force-run` on 4.5 (`exit_pre` missing)
19-
- harness FAIL missing sidecar — `--silent-handler` / `--no-handler`
20-
- harness FAIL wrong contents — `--wrong-text` (`nope`), `--write-in-main`
21-
(`from-main`), `--atexit-instead` (`atexit-ok`)
22-
2315
The harness checks **contents** (`sidecar_contains=exit_pre-ok`), not
24-
existence only. A file written from `main` or `atexit` is red.
16+
existence only. A file written from `main` or `atexit` is red. Several
17+
falsifiers exit 0 from the script so the **harness** can fail after Blender
18+
dies.
2519

2620
## Run
2721

@@ -33,3 +27,19 @@ python tests/smoke/run_example.py --name exit-pre-sidecar \
3327
--series 5.2 --min-version 5.1 \
3428
--expect-sidecar /tmp/exit-pre.sidecar --sidecar-contains exit_pre-ok
3529
```
30+
31+
## Exit codes
32+
33+
Per-script sequential checks. `9` is a valid check code; there is no rule
34+
against it. `77` is the smoke skip protocol, not a product check.
35+
36+
| Code | Meaning |
37+
| --- | --- |
38+
| 0 | Success (including `--silent-handler` / `--no-handler` / `--wrong-text` / `--write-in-main` / `--atexit-instead`, which the harness then fails) |
39+
| 1 | Uncaught exception (FATAL wrapper); also `$BDT_SMOKE_SIDECAR` unset |
40+
| 2 | argparse / usage; also `--force-run` on Blender &lt; 5.1 (`exit_pre` missing or unexpectedly present) |
41+
| 77 | `SMOKE_SKIP:` `exit_pre` requires Blender 5.1+ |
42+
43+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS (5.1 on the
44+
weekly cron, the `needs-5.1` PR label, or manual dispatch) and skips on 4.5
45+
LTS. Smoke does not pass the falsifier flags.

examples/export-preset-axis/README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,26 @@ blender --background --python export_preset_axis.py -- --output beacon.png
4343
blender --background --python export_preset_axis.py -- --output beacon.png --engine cycles
4444
```
4545

46-
It exits non-zero on failure (RNA drift, source not Z-dominant, Unity disk
47-
not converted, Godot disk not Z-up, Unity not standing, Godot not lying,
48-
orientations equal). The `blender-smoke` workflow runs the check on Blender
49-
5.2 LTS and 4.5 LTS (5.1 on the weekly cron).
46+
## Exit codes
47+
48+
Per-script sequential checks. `9` is a valid check code; there is no rule
49+
against it. `10` is the shared framing helper.
50+
51+
| Code | Meaning |
52+
| --- | --- |
53+
| 0 | Success |
54+
| 1 | Uncaught exception (FATAL wrapper) |
55+
| 2 | argparse / usage; also exporter RNA missing expected glTF kwargs |
56+
| 3 | Source mast is not Z-dominant, or tip drifted |
57+
| 4 | glTF reimport produced no mesh |
58+
| 5 | Unity disk POSITION is not `(x, z, -y)`, or Unity node has rotation |
59+
| 6 | Godot disk POSITION is not raw Z-up; also `--output` produced no file |
60+
| 7 | Unity reimport is not standing |
61+
| 8 | Godot reimport is not lying along Y, or reimported tip mismatch |
62+
| 9 | Reimported orientations did not differ (`--same-axis` lands here) |
63+
| 10 | Gallery framing violation |
64+
| 11 | `--same-axis` did not collapse the axis difference |
65+
66+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
67+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
68+
Smoke does not pass `--output` or `--same-axis`.

examples/gn-bundle-roundtrip/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,23 @@ not read at thumbnail.
4343
blender --background --python gn_bundle_roundtrip.py --
4444
blender --background --python gn_bundle_roundtrip.py -- --force-run
4545
```
46+
47+
## Exit codes
48+
49+
Per-script sequential checks. `9` is a valid check code; there is no rule
50+
against it. `77` is the smoke skip protocol, not a product check.
51+
52+
| Code | Meaning |
53+
| --- | --- |
54+
| 0 | Success |
55+
| 1 | Uncaught exception (FATAL wrapper) |
56+
| 2 | argparse / usage; carrier mesh rewritten; `--legacy-rna` on 5.x |
57+
| 3 | Evaluated vert/face count off closed form (`--mismatch`) |
58+
| 4 | Unpacked Scale/Offset x-extent off (`--bypass`) |
59+
| 5 | `bundle_mark` missing or off closed form |
60+
| 77 | `SMOKE_SKIP:` Bundles require Blender 5.0+ |
61+
62+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS (5.1 on the
63+
weekly cron, the `needs-5.1` PR label, or manual dispatch) and skips on 4.5
64+
LTS. Smoke does not pass `--bypass`, `--legacy-rna`, `--mismatch`, or
65+
`--force-run`.

examples/gn-zone-iterate/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,25 @@ blender --background --python gn_zone_iterate.py -- --output zones.png
4040

4141
The `--output` render path measures framing via `examples/gallery_framing.py`
4242
(exit 10 on violation).
43+
44+
## Exit codes
45+
46+
Per-script sequential checks. `9` is a valid check code; there is no rule
47+
against it. `10` is the shared framing helper.
48+
49+
| Code | Meaning |
50+
| --- | --- |
51+
| 0 | Success |
52+
| 1 | Uncaught exception (FATAL wrapper) |
53+
| 2 | argparse / usage; also carrier mesh was rewritten |
54+
| 3 | Repeat evaluated vert/face count off closed form |
55+
| 4 | Repeat X-centers off closed form |
56+
| 5 | For Each evaluated vert/face count off closed form |
57+
| 6 | For Each Z-centers off closed form |
58+
| 10 | Gallery framing violation |
59+
| 12 | `--output` produced no file |
60+
61+
The `blender-smoke` workflow runs the check on Blender 5.2 LTS and 4.5 LTS
62+
(5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch).
63+
Smoke does not pass `--output`, `--no-offset`, `--unpair-foreach`, or
64+
`--unpair-repeat`.

0 commit comments

Comments
 (0)