You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f62501d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(rules): no-removed-normals-api rule and mesh-normals-after-41 example
Pre-4.1 auto smooth code (use_auto_smooth, auto_smooth_angle,
calc_normals_split, free/create_normals_split) is among the most common
errors in generated Blender code, and it raises AttributeError on 4.5 LTS
and 5.x. Nothing in the pack mentioned it.
- Rule no-removed-normals-api flags those calls, with a replacement table.
- mesh-editing-and-bmesh gains a Normals after 4.1 section and a mistakes
entry.
- examples/mesh-normals-after-41 (check-only) proves, on 4.5.14 and 5.2.1:
- the removed attributes are absent, and the pre-4.1 code raises;
- set_sharp_from_angle(30 deg) marks the 32 cap rims of a 16-sided
cylinder and also smooths all 18 faces (undocumented in the old
pattern);
- corner_normals needs no calc call: a rim vertex has 2 normals, and 3
after flattening.
Falsifiers: --legacy-api 3, --sharp-angle 10 4, --flatten-after 5,
--skip-set-sharp 6.
- Also measured: shade_auto_smooth adds a Smooth by Angle modifier on
5.2.1 but returns CANCELLED on 4.5.14 headless. The rule and skill say
so.
Counts move to 11 rules and 68 examples (12 check-only).
Closes#379
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Extensions runtime: `extension-user-data.py` (`extension_path_user` settings file and an `online_access` guard). Long-running work: `thread-queue-timer.py` (worker thread, `queue.Queue`, main-thread drain timer).
113
114
114
-
## Examples (67)
115
+
## Examples (68)
115
116
116
117
Runnable scripts at `examples/<name>/`, each asserting a real API contract with
117
118
deterministic checks (exit non-zero on failure) and optionally rendering a still via
118
119
`--output`. All of them run headless on Blender 5.2 LTS and 4.5 LTS in `blender-smoke.yml` (5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch);
119
-
**56 of the 67 ship a render in the site gallery** at `docs/gallery/`. The other
120
-
eleven are **check-only**: they carry no `--output` path, no gallery entry, and no
120
+
**56 of the 68 ship a render in the site gallery** at `docs/gallery/`. The other
121
+
twelve are **check-only**: they carry no `--output` path, no gallery entry, and no
121
122
hero asset. The criterion is whether the contract is expressible in pixels. An
122
123
example is check-only when its witness is a data or state fact that no scene
123
124
redesign can make visible — a datablock name, an RNA attribute's presence, a
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -288,7 +288,7 @@ The drift-check workflow enforces these on every push and PR.
288
288
289
289
## Aggregate Counts
290
290
291
-
`README.md` declares aggregate counts (e.g. "19 skills, 10 rules, 3 templates, 29 snippets, 67 examples, and 80 showcase pieces"). The `validate-counts` job in `.github/workflows/validate.yml` enforces these substrings against the filesystem on every push and PR. Showcase pieces are counted separately from examples. When you add or remove content, update the README counts in the same commit.
291
+
`README.md` declares aggregate counts (e.g. "19 skills, 11 rules, 3 templates, 29 snippets, 68 examples, and 80 showcase pieces"). The `validate-counts` job in `.github/workflows/validate.yml` enforces these substrings against the filesystem on every push and PR. Showcase pieces are counted separately from examples. When you add or remove content, update the README counts in the same commit.
This repository ships **19 skills, 10 rules, 3 templates, 29 snippets, 67 examples, and 80 showcase pieces** for Blender Python development targeting Blender 5.2 LTS (current stable) with Blender 4.5 LTS fallback support. Blender 5.1 is prior stable.
47
+
This repository ships **19 skills, 11 rules, 3 templates, 29 snippets, 68 examples, and 80 showcase pieces** for Blender Python development targeting Blender 5.2 LTS (current stable) with Blender 4.5 LTS fallback support. Blender 5.1 is prior stable.
48
48
49
49
The content is consumed by AI coding agents, installed as a plugin or read from a checkout. An optional second plugin registers the official [Blender Lab MCP server](https://www.blender.org/lab/mcp-server/) for live sessions (see [Live Blender session](#live-blender-session-mcp)); the server is referenced from upstream, not part of this repository, and nothing else depends on it. Cursor and Claude Code both install it as a plugin (see [Quick start](#quick-start)): Cursor loads the skills and applies `rules/*.mdc` wherever their scope globs match; Claude Code loads the skills and gets the rules through a generated `blender-rules` skill, since it does not read Cursor `.mdc` files. An agent picks a skill up when its description matches the task. Any agent that can read files in a workspace can use it the same way. There is no build step for the content — edit the Markdown and Python files directly.
50
50
@@ -61,7 +61,7 @@ The content is consumed by AI coding agents, installed as a plugin or read from
61
61
62
62
Neither agent needs a clone of `main`: both install the slim `plugin-dist` build. Clone the full repository only to [run the examples or contribute](#run-the-examples-or-contribute).
63
63
64
-
-**Cursor** — install it as a local plugin from the slim `plugin-dist` branch, then run **Developer: Reload Window**. **Customize** lists the 19 skills and 10 rules; the rules apply by glob scope and the agent loads a skill when its description matches the task.
64
+
-**Cursor** — install it as a local plugin from the slim `plugin-dist` branch, then run **Developer: Reload Window**. **Customize** lists the 19 skills and 11 rules; the rules apply by glob scope and the agent loads a skill when its description matches the task.
@@ -129,7 +129,7 @@ Releases ship often; [CHANGELOG.md](CHANGELOG.md) lists what each one changed.
129
129
130
130
## Falsifiers
131
131
132
-
Every one of the 67 examples carries a **falsifier**: a flag that changes the
132
+
Every one of the 68 examples carries a **falsifier**: a flag that changes the
133
133
input so a real assertion fails. It never disables the assertion, skips the
134
134
check, or short-circuits to an error — it feeds the script something the
135
135
contract says must not pass, and the same check that guards the happy path
@@ -157,7 +157,7 @@ per-script exit-code model, are in
157
157
158
158
## Examples and showcase
159
159
160
-
**67 examples** in [`examples/`](examples/) are runnable, self-checking scripts: each asserts one API contract, carries a falsifier, and runs headless on Blender 5.2 LTS and 4.5 LTS in the `blender-smoke` workflow (5.1 on the weekly cron or by manual dispatch). Those whose contract is visible also render a still. **80 showcase pieces** in [`showcase/`](showcase/) exist to show the skills working together at production scale: each is a single headless script that models a game prop, then runs it through the same cleanup, bake, LOD, collider and export steps the skills teach, and fails if a measured budget (triangle counts, colliders, materials, real-world size) is missed. They are not API examples. Conventions: [`showcase/README.md`](showcase/README.md).
160
+
**68 examples** in [`examples/`](examples/) are runnable, self-checking scripts: each asserts one API contract, carries a falsifier, and runs headless on Blender 5.2 LTS and 4.5 LTS in the `blender-smoke` workflow (5.1 on the weekly cron or by manual dispatch). Those whose contract is visible also render a still. **80 showcase pieces** in [`showcase/`](showcase/) exist to show the skills working together at production scale: each is a single headless script that models a game prop, then runs it through the same cleanup, bake, LOD, collider and export steps the skills teach, and fails if a measured budget (triangle counts, colliders, materials, real-world size) is missed. They are not API examples. Conventions: [`showcase/README.md`](showcase/README.md).
161
161
162
162
Browse both, with filters, full-size renders and each script's README, in the **[gallery](https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/)**.
163
163
@@ -176,10 +176,10 @@ Browse both, with filters, full-size renders and each script's README, in the **
176
176
177
177
```
178
178
skills/<name>/SKILL.md - 19 skill files, YAML frontmatter, one canonical pattern each
Copy file name to clipboardExpand all lines: ROADMAP.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ showcase pool further down. Each item is an open issue; nothing here is pinned t
11
11
12
12
-**New skills:**`porting-to-blender-5`, one index of every 4.x to 5.x break the pack covers ([#466](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/466)); teach the API contracts that shipped examples prove but no skill covers yet, such as Grease Pencil v3, the 5.x compositor, constraints and image pixels ([#456](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/456))
13
13
-**Skill corrections:** the full Principled BSDF v2 socket rename table in `procedural-materials-and-shaders` ([#382](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/382))
14
-
-**New rules:** flag the mesh-normals APIs removed in 4.1 (`use_auto_smooth`, `calc_normals_split`, `free_normals_split`) ([#379](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/379))
15
14
-**Examples for skills that have none:** check-only examples for `operators`, `ui-panels`, `addon-scaffolding` and `bl-info-migration` ([#378](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/378)); a skill-to-example index and one machine-readable examples manifest with version support ([#377](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/377))
16
15
-**Verification:** run the shipped snippets and SKILL.md code blocks in CI instead of frozen copies ([#447](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/447)); a weekly, non-gating smoke run against Blender daily builds to catch API breaks before a release ([#457](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/457))
17
16
-**More agents:** first-class support for Codex, Copilot, Windsurf and Gemini through `.agents/skills` and an AGENTS.md rules export ([#376](https://github.com/TMHSDigital/Blender-Developer-Tools/issues/376))
@@ -39,6 +38,7 @@ derives the actual version from conventional-commit types.
Copy file name to clipboardExpand all lines: claude/blender-rules.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,12 @@ Flag `import bgl` and any `bgl.` call. The `bgl` OpenGL wrapper was deprecated i
17
17
18
18
Applies to: `**/*.py`. Full rule: [`rules/no-bgl.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-bgl.mdc).
19
19
20
+
## no-removed-normals-api
21
+
22
+
Flag the mesh normals API removed in Blender 4.1 — `use_auto_smooth`, `auto_smooth_angle`, `calc_normals_split()`, `free_normals_split()`, `create_normals_split()`. Each raises AttributeError on 4.5 LTS and 5.x. Use `Mesh.set_sharp_from_angle`, `object.shade_auto_smooth`, and `Mesh.corner_normals` (always current) instead.
23
+
24
+
Applies to: `**/*.py`. Full rule: [`rules/no-removed-normals-api.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-removed-normals-api.mdc).
25
+
20
26
## no-unapplied-modifiers-on-export
21
27
22
28
Flag an export call on objects that still carry unapplied modifiers when the export arguments do not request evaluated geometry. The engine then receives the authored cage, not the modifier result.
Copy file name to clipboardExpand all lines: claude/skills/blender-rules/SKILL.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,12 @@ Flag `import bgl` and any `bgl.` call. The `bgl` OpenGL wrapper was deprecated i
22
22
23
23
Applies to: `**/*.py`. Full rule: [`rules/no-bgl.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-bgl.mdc).
24
24
25
+
## no-removed-normals-api
26
+
27
+
Flag the mesh normals API removed in Blender 4.1 — `use_auto_smooth`, `auto_smooth_angle`, `calc_normals_split()`, `free_normals_split()`, `create_normals_split()`. Each raises AttributeError on 4.5 LTS and 5.x. Use `Mesh.set_sharp_from_angle`, `object.shade_auto_smooth`, and `Mesh.corner_normals` (always current) instead.
28
+
29
+
Applies to: `**/*.py`. Full rule: [`rules/no-removed-normals-api.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-removed-normals-api.mdc).
30
+
25
31
## no-unapplied-modifiers-on-export
26
32
27
33
Flag an export call on objects that still carry unapplied modifiers when the export arguments do not request evaluated geometry. The engine then receives the authored cage, not the modifier result.
Copy file name to clipboardExpand all lines: docs/gallery/index.html
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@
62
62
<h1>Examples and Showcase</h1>
63
63
<p>Runnable Blender Python examples, each run headless on Blender 5.2 LTS and 4.5 LTS in CI, so every render reflects code that actually runs — shown beside budget-conformance showcase props.</p>
64
64
<detailsclass="check-only" id="check-only">
65
-
<summary>56 rendered · 11 check-only examples (data contracts with nothing to see)</summary>
65
+
<summary>56 rendered · 12 check-only examples (data contracts with nothing to see)</summary>
66
66
<div>
67
67
A check-only example asserts a fact no render can show, such as a datablock name,
68
68
an RNA attribute, a post-exit sidecar or a topology count. It runs in the same
@@ -75,6 +75,7 @@ <h1>Examples and Showcase</h1>
75
75
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/gn-bundle-roundtrip/">gn-bundle-roundtrip</a>: Combine Bundle / Separate Bundle packing a cube plus Scale, Offset, and Mark — witnessing <code>geometry-nodes-python</code> item-name round-trip, not tree structure.</li>
76
76
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/gpu-offscreen-draw/">gpu-offscreen-draw</a>: Check-only witness for drawing with the <code>gpu</code> module, the replacement for the <code>bgl</code> module that 5.x removed.</li>
77
77
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/mesh-automasking-settings/">mesh-automasking-settings</a>: Pathology witness for the 5.2 move of sculpt automasking RNA off <code>Brush</code> into <code>MeshAutomaskingSettings</code>.</li>
78
+
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/mesh-normals-after-41/">mesh-normals-after-41</a>: Check-only witness for the normals API that replaced auto smooth in Blender 4.1, on 4.5 LTS and 5.x alike.</li>
78
79
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/ngon-triangulate/">ngon-triangulate</a>: Synthesizes one hexagon by dissolving a cube edge, then asserts the hygiene / tangent contracts on that defective mesh.</li>
79
80
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/timers-modal-threading/">timers-modal-threading</a>: Proves the event-loop contracts behind long-running add-on work.</li>
80
81
<li><ahref="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/unapplied-scale-gltf/">unapplied-scale-gltf</a>: Synthesizes unapplied non-uniform object scale on a unit cube, then asserts the glTF exporter contract.</li>
0 commit comments