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 4a891d1
Browse filesBrowse the repository at this point in the historyBrowse files
feat: gpu-draw-handler and set-sharp-from-angle snippets, no-legacy-vse-sequences rule
- snippets/gpu-draw-handler.py: POST_VIEW overlay that stores its
draw_handler_add handle and removes it in unregister()
- snippets/set-sharp-from-angle.py: the 4.1+ replacement for
use_auto_smooth, reading corner_normals
- rules/no-legacy-vse-sequences.mdc: flags .sequences and .sequences_all.
Measured hasattr on a fresh SequenceEditor: 4.5.14 LTS has sequences,
sequences_all, strips and strips_all; 5.2.1 LTS has only strips and
strips_all (.sequences_all raises AttributeError too)
Both snippets ran headless on 4.5.14 and 5.2.1 (register twice, unregister,
handle cleared; 96 corner normals, all 18 faces smooth). Counts now 12 rules,
31 snippets; rule exports regenerated; run_all.py 35/35.
Closes#500Closes#501Closes#502
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@ The **Blender Developer Tools** repository is at **v0.156.0**. It packages skill
18
18
19
19
```
20
20
skills/<skill-name>/SKILL.md - AI workflow definitions, 20 total
21
-
rules/<rule-name>.mdc - Anti-pattern rules, 11 total
21
+
rules/<rule-name>.mdc - Anti-pattern rules, 12 total
22
22
templates/<template-name>/ - Starter projects, 3 total
23
-
snippets/<snippet-name>.py - Standalone code patterns, 29 total
23
+
snippets/<snippet-name>.py - Standalone code patterns, 31 total
24
24
examples/<name>/ - Runnable smoke-gated examples, 69 total (+ gallery.json)
25
25
showcase/<name>/ - Budget-conformance props, 80 pieces, each with a gallery `category` (sibling of examples/; see showcase/README.md § Categories)
26
26
scripts/build_gallery.py - Regenerates docs/gallery/ from examples/gallery.json + showcase/gallery.json
@@ -55,7 +55,7 @@ VERSION - Source of truth for the repo version
55
55
| porting-to-blender-5 | Index of every 4.x → 5.x break the pack covers (bgl, `action.fcurves`, `use_auto_smooth`, Principled sockets, `.sequences`, ID properties, compositor, NodesModifier inputs, ...), each linked to the skill, rule or example that owns the fix; headless triage recipe |
56
56
| gpu-drawing-and-overlays |`gpu` instead of the removed `bgl`: `draw_handler_add`/`remove`, builtin shader names, `gpu.state` blending and depth, `POLYLINE_*` line width, `blf` text, `GPUOffScreen` with 5.2's `gpu.init()` headless |
57
57
58
-
## Rules (11)
58
+
## Rules (12)
59
59
60
60
Every rule sets `alwaysApply: false`, so the Scope column below is the rule's
61
61
actual load condition, not a description: a rule enters context only when a file
@@ -74,6 +74,7 @@ matching its `globs` does. Changing a glob changes when the rule fires.
74
74
| use-correct-axis-rna-per-exporter |`*.py`|`export_scene.gltf` with FBX `axis_forward`/`axis_up`, or `export_scene.fbx` with glTF `export_yup`|
75
75
| no-bgl |`*.py`|`import bgl` or any `bgl.` call (removed in 5.x; the add-on fails to register) |
76
76
| no-removed-normals-api |`*.py`|`use_auto_smooth`, `auto_smooth_angle`, `calc_normals_split()` and the other normals calls removed in 4.1 |
77
+
| no-legacy-vse-sequences |`*.py`|`sequence_editor.sequences` / `.sequences_all` (removed in 5.x; `.strips` / `.strips_all` exist on 4.5 too) |
77
78
78
79
## Templates (3)
79
80
@@ -101,7 +102,7 @@ matching its `globs` does. Changing a glob changes when the rule fires.
101
102
- Unity / Godot / Unreal glTF export via the engine-export-presets contract
102
103
- Explicit exit codes matching `headless-batch-script-template` (0, then 2+)
103
104
104
-
## Snippets (29)
105
+
## Snippets (31)
105
106
106
107
Small standalone `.py` files at `snippets/<name>.py`, each 5 to 75 lines.
AI asset pipeline track: `decimate_to_budget.py`, `convex_hull_collider.py`, `lod_chain.py` (helper duplicated, not imported), `gltf_draco_export.py`, `export_preset_unity.py`, `export_preset_godot.py`, `export_preset_unreal.py`, `setup_bake_target_image.py`, `bake_normal_high_to_low.py`, `save_baked_image.py`.
113
114
114
-
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).
115
+
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). Porting to 5.x: `gpu-draw-handler.py` (viewport overlay with a stored, removable draw handler) and `set-sharp-from-angle.py` (the 4.1+ replacement for `use_auto_smooth`).
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
@@ -292,7 +292,7 @@ The drift-check workflow enforces these on every push and PR.
292
292
293
293
## Aggregate Counts
294
294
295
-
`README.md` declares aggregate counts (e.g. "20 skills, 11 rules, 3 templates, 29 snippets, 69 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.
295
+
`README.md` declares aggregate counts (e.g. "20 skills, 12 rules, 3 templates, 31 snippets, 69 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 **20 skills, 11 rules, 3 templates, 29 snippets, 69 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 **20 skills, 12 rules, 3 templates, 31 snippets, 69 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
@@ -53,15 +53,15 @@ The content is consumed by AI coding agents, installed as a plugin or read from
53
53
|**Skills**| Guided workflows: scaffolding, operators, panels, properties, mesh and bmesh, headless batch, slotted actions, geometry nodes, procedural materials, depsgraph queries, drivers and handlers, `bl_info` migration, video sequencer, imported-mesh cleanup, high-to-low baking, engine export presets, extension runtime and packaging, timers, modal operators and threading, GPU drawing and viewport overlays, porting add-ons to Blender 5 |
54
54
|**Rules**| Guardrails for the most common AI mistakes: ops-in-loops, bmesh leaks, legacy `bl_info` only, prop assignments, deprecated context-copy override, per-element loops over bulk mesh data, import without scale check, export without evaluated geometry, mixed glTF/FBX axis RNA |
55
55
|**Templates**| A working Extensions Platform add-on starter, a headless batch script starter, and a GLB-in engine-ready asset pipeline |
56
-
|**Snippets**|29 small standalone Python files demonstrating canonical patterns, 5 to 75 lines each |
56
+
|**Snippets**|31 small standalone Python files demonstrating canonical patterns, 5 to 75 lines each |
57
57
|**Examples**| Runnable headless scripts under [`examples/`](examples/). Each asserts an API contract and exits non-zero on failure. |
58
58
|**Showcase**| Proof that the skills compose: each piece under [`showcase/`](showcase/) is one headless Python script that builds a game prop and runs the whole asset pipeline (cleanup, high-to-low bake, LODs, convex collider, engine export), asserting measured budgets on every LTS. Not API examples. Conventions: [`showcase/README.md`](showcase/README.md)|
59
59
60
60
## Quick start
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 20 skills and 11 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 20 skills and 12 rules; the rules apply by glob scope and the agent loads a skill when its description matches the task.
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-legacy-vse-sequences
21
+
22
+
Flag `sequence_editor.sequences` and `.sequences_all`. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while `.strips` and `.strips_all` already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.
23
+
24
+
Applies to: `**/*.py`. Full rule: [`rules/no-legacy-vse-sequences.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-legacy-vse-sequences.mdc).
25
+
20
26
## no-removed-normals-api
21
27
22
28
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.
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-legacy-vse-sequences
26
+
27
+
Flag `sequence_editor.sequences` and `.sequences_all`. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while `.strips` and `.strips_all` already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.
28
+
29
+
Applies to: `**/*.py`. Full rule: [`rules/no-legacy-vse-sequences.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-legacy-vse-sequences.mdc).
30
+
25
31
## no-removed-normals-api
26
32
27
33
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.
Copy file name to clipboardExpand all lines: exports/AGENTS.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-legacy-vse-sequences
21
+
22
+
Flag `sequence_editor.sequences` and `.sequences_all`. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while `.strips` and `.strips_all` already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.
23
+
24
+
Applies to: `**/*.py`. Full rule: [`rules/no-legacy-vse-sequences.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-legacy-vse-sequences.mdc).
25
+
20
26
## no-removed-normals-api
21
27
22
28
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.
Copy file name to clipboardExpand all lines: exports/copilot/blender-python.instructions.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
@@ -21,6 +21,12 @@ Flag `import bgl` and any `bgl.` call. The `bgl` OpenGL wrapper was deprecated i
21
21
22
22
Applies to: `**/*.py`. Full rule: [`rules/no-bgl.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-bgl.mdc).
23
23
24
+
## no-legacy-vse-sequences
25
+
26
+
Flag `sequence_editor.sequences` and `.sequences_all`. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while `.strips` and `.strips_all` already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.
27
+
28
+
Applies to: `**/*.py`. Full rule: [`rules/no-legacy-vse-sequences.mdc`](https://github.com/TMHSDigital/Blender-Developer-Tools/blob/main/rules/no-legacy-vse-sequences.mdc).
29
+
24
30
## no-removed-normals-api
25
31
26
32
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.
0 commit comments