Skip to content

Commit 1317575

Browse files
committed
feat: add compositor-glare smoke-gated example
Witness the 5.0 compositor rewrite that breaks AI-generated bloom code: scene.node_tree/use_nodes are gone on 5.x (the scene compositor is a node group on scene.compositing_node_group), the Glare node moved from legacy enum properties to menu/float input sockets, the 4.x threshold property is a dead shim, and EEVEE has had no use_bloom since 4.2. The example wires Render Layers -> Glare (Fog Glow) -> output on both API surfaces and proves with pixels that the halo falls off strictly with the compositor on and is exactly zero with it off.
1 parent 6f0d245 commit 1317575

13 files changed

Lines changed: 1076 additions & 8 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
],
6161
"examples": [
6262
"examples/bmesh-gear",
63+
"examples/compositor-glare",
6364
"examples/curve-bevel-arc",
6465
"examples/depsgraph-export",
6566
"examples/driver-wave",

.github/workflows/blender-smoke.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,14 @@ jobs:
232232
# verts=1044 faces=1028, tube rests on floor. Exits non-zero on failure.
233233
xvfb-run -a "$BLENDER" --background \
234234
--python examples/curve-bevel-arc/curve_bevel_arc.py --
235+
236+
- name: Shipped example - compositor glare (Fog Glow + 5.x node group)
237+
run: |
238+
set -euo pipefail
239+
# Two tiny 1-sample Cycles renders (compositor on vs off, ~seconds each):
240+
# asserts the cross-version compositor plumbing (compositing_node_group
241+
# on 5.x, scene.node_tree on 4.x), the Glare Fog Glow configuration, a
242+
# strictly-falling halo with the compositor on, and exactly-zero halo
243+
# pixels with it off. Exits non-zero on failure.
244+
xvfb-run -a "$BLENDER" --background \
245+
--python examples/compositor-glare/compositor_glare.py --

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ env/
2323
*.blend2
2424
*.blend3
2525
*.blend@
26+
.scratch
2627

2728
# OS
2829
.DS_Store
@@ -45,4 +46,3 @@ dist/
4546
build/
4647
*.zip
4748
*.log
48-
docs/new-example-prompt.md

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The content base (counts are CI-enforced against README.md and the manifest):
2727
- 2 templates: `extension-addon-template` for Extensions Platform add-ons,
2828
and `headless-batch-script-template` for unattended batch jobs.
2929
- 17 snippets covering canonical patterns.
30-
- 12 examples under `examples/<name>/`: runnable scripts that assert a real
30+
- 13 examples under `examples/<name>/`: runnable scripts that assert a real
3131
API contract with deterministic checks, exit non-zero on failure, and
3232
optionally render a still via `--output`. Each is executed headless on
3333
Blender 4.5 LTS and 5.1 by `blender-smoke.yml`; its render ships in the
@@ -41,7 +41,7 @@ Blender-Developer-Tools/
4141
rules/<rule-name>.mdc # 6 rule files
4242
templates/<template-name>/ # 2 starter templates
4343
snippets/<snippet-name>.py # 17 standalone Python snippets
44-
examples/<name>/ # 12 runnable smoke-gated examples (+ gallery.json)
44+
examples/<name>/ # 13 runnable smoke-gated examples (+ gallery.json)
4545
scripts/build_gallery.py # generates docs/gallery/ (stdlib only)
4646
scripts/site/ # vendored landing-page build (build_site.py + template)
4747
docs/gallery/ # committed generated gallery pages + hero assets

CLAUDE.md

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

8181
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'`.
8282

83-
## Examples (12)
83+
## Examples (13)
8484

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

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
</p>
1818

1919
<p align="center">
20-
<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>12 examples</strong>
20+
<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>13 examples</strong>
2121
</p>
2222

2323
---
2424

2525
## Overview
2626

27-
This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 12 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support.
27+
This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 13 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support.
2828

2929
The content is consumed by AI coding agents (Cursor, Claude Code, any MCP-capable client) when working on Blender add-ons, geometry nodes scripts, batch pipelines, or animation tooling. There is no build step. Edit the markdown and Python files directly.
3030

@@ -218,6 +218,21 @@ A beveled Bezier semicircle authored on `bpy.types.Curve` — `splines.new('BEZI
218218
without a prior mesh conversion. Asserts eight points, `bevel_depth == 0.15`, and
219219
evaluated topology 1044 verts / 1028 faces.
220220

221+
</td>
222+
</tr>
223+
<tr>
224+
<td width="46%" valign="middle">
225+
<a href="examples/compositor-glare/"><img src="examples/compositor-glare/preview.webp" alt="Compositor glare: three neon rings - violet, cyan, and amber - with colored bloom halos and mirrored reflections on a dark studio floor" /></a>
226+
</td>
227+
<td valign="middle">
228+
229+
### [compositor-glare](examples/compositor-glare/)
230+
231+
Bloom through the compositor on both sides of the 5.0 rewrite — a `Glare` (Fog Glow)
232+
node fed by `Render Layers`, wired via `scene.compositing_node_group` on 5.x and
233+
`scene.node_tree` on 4.x. Witnesses with pixels that the halo falls off strictly with
234+
the compositor on and is exactly zero with it off — and that EEVEE has no `use_bloom`.
235+
221236
</td>
222237
</tr>
223238
</table>
26.9 KB
Loading

0 commit comments

Comments
 (0)