Skip to content

Commit 76262f3

Browse files
feat: add gp-lineart-contour example (#100)
Witness Grease Pencil LINEART modifier contours via the depsgraph, the source_object and edge-flag failure modes, and the thickness→radius trap across 4.5 LTS and 5.1. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 73abcf7 commit 76262f3

12 files changed

Lines changed: 1186 additions & 4 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"examples/gltf-skin-roundtrip",
7474
"examples/gn-instance-grid",
7575
"examples/gn-sdf-remesh",
76+
"examples/gp-lineart-contour",
7677
"examples/grease-pencil-rosette",
7778
"examples/image-pixels-testcard",
7879
"examples/light-link-studio",

.github/workflows/blender-smoke.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,17 @@ jobs:
287287
xvfb-run -a "$BLENDER" --background \
288288
--python examples/grease-pencil-rosette/grease_pencil_rosette.py --
289289
290+
- name: Shipped example - gp line art contour (LINEART modifier + thickness trap)
291+
run: |
292+
set -euo pipefail
293+
# Check only (no render): GPv3 object + LINEART modifier; asserts
294+
# source_object is load-bearing (clear → 0 strokes), contour+crease
295+
# off → 0, restore recovers silhouette strokes, and thickness is
296+
# 4.5-only (AttributeError on 5.1; portable path is radius).
297+
# Exits non-zero on failure.
298+
xvfb-run -a "$BLENDER" --background \
299+
--python examples/gp-lineart-contour/gp_lineart_contour.py --
300+
290301
- name: Shipped example - armature bend (edit_bones + LBS closed form)
291302
run: |
292303
set -euo pipefail

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</p>
1919

2020
<p align="center">
21-
<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>33 examples</strong>
21+
<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>34 examples</strong>
2222
</p>
2323

2424
<p align="center">
@@ -36,7 +36,7 @@
3636

3737
## Overview
3838

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

4141
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.
4242

@@ -482,7 +482,7 @@ and every orbit lands on its closed form.
482482
</details>
483483

484484
<details>
485-
<summary><strong>Context &amp; Grease Pencil</strong> — 2 examples</summary>
485+
<summary><strong>Context &amp; Grease Pencil</strong> — 3 examples</summary>
486486

487487
<table>
488488
<tr>
@@ -514,6 +514,22 @@ while `grease_pencils` is still legacy; on 5.x legacy is gone and GPv3 owns the
514514
name. Point writes lazily materialize attribute layers, and every position
515515
round-trips through the raw `POINT` buffer.
516516

517+
</td>
518+
</tr>
519+
<tr>
520+
<td width="46%" valign="middle">
521+
<a href="examples/gp-lineart-contour/"><img src="examples/gp-lineart-contour/preview.webp" alt="GP Line Art contour: a faceted teal crystal on a dark studio floor outlined in neon cyan Grease Pencil Line Art strokes, proving modifiers.new LINEART with source_object silhouette evaluation" /></a>
522+
</td>
523+
<td valign="middle">
524+
525+
### [gp-lineart-contour](examples/gp-lineart-contour/)
526+
527+
Grease Pencil `LINEART` modifier contours via the depsgraph — not Freestyle and
528+
not hand-drawn strokes. `source_object` is load-bearing (clear → 0 strokes);
529+
contour+crease off → 0; restore recovers **10** strokes / **34** points on both
530+
binaries. Stroke width: `thickness` exists on 4.5, `AttributeError` on 5.1 —
531+
portable path is `radius`.
532+
517533
</td>
518534
</tr>
519535
</table>

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo
115115
- ~~Collision compound witness~~ **SHIPPED** as `examples/collision-hull-proxy/` — game-prop collision as a compound of convex pieces, each a `bmesh.ops.convex_hull` of a coarse `sec(π/n)`-inflated cage (containment 4.4e-08, watertight, positive signed volume, Euler 2, per-piece 255-face budget: body 70, caps 60×3, compound 250); a hull of the dense render mesh measures 380 faces — over budget — which is why pipelines hull cages; proud details cost cage rows, concave grooves are free; byte-identical on 4.5.11 and 5.1.2
116116
- ~~Custom-normals / shade-by-angle witness~~ **SHIPPED** as `examples/custom-normals-shade/` — the post-4.1 shading contract: `use_auto_smooth`/`use_custom_normals`/`calc_normals` are AttributeError on BOTH 4.5.11 and 5.1.2; `set_sharp_from_angle` sharp sets match an independent dihedral recompute exactly (188/388 edges, 3 meshes); evaluated normal welds/splits exact (0.0 dev); custom split normals survive depsgraph evaluation within int16 quantization (1.407e-04, not float-exact); **divergence**: the legacy `shade_auto_smooth` operator CANCELS headless on 4.5 ("Asset loading is unfinished", mesh untouched, no exception) while 5.1 FINISHES with the Smooth-by-Angle NODES modifier — the data API is the portable path
117117
- ~~Sky Texture / sun_elevation witness~~ **SHIPPED** as `examples/sky-texture-sun-elevation/` — World `ShaderNodeTexSky` → Background; `sky_type` is `NISHITA` on 4.5 and `MULTIPLE_SCATTERING` on 5.1 (`NISHITA` gone); `dust_density` is 4.5-only (`aerosol_density` on 5.1); zenith EXR rise 8°→55° measured **2.25x** (5.1.2) / **1.50x** (4.5.11), gate ≥ 1.25; dual-elevation gallery diptych
118-
- Grease Pencil Line Art contour witness: empty GPv3 object + `modifiers.new(..., "LINEART")`; `thickness` on 4.5 vs `radius` on 5.1; evaluated contour stroke counts for a known source mesh
118+
- ~~Grease Pencil Line Art contour witness~~ **SHIPPED** as `examples/gp-lineart-contour/` — GPv3 + `modifiers.new(..., "LINEART")`; `source_object` clear → 0 strokes; contour+crease off → 0; restore recovers **10** strokes / **34** points on 4.5.11 and 5.1.2; `thickness` is 4.5-only (`AttributeError` on 5.1; portable `radius`)
119119
- Camera DOF + focus_distance witness: `cam.dof.use_dof`, focus plane vs defocus variance on high-freq cards (Stage deviation — depth needs background content)
120120
- Volumetric scatter optical-depth witness: Volume Scatter density → Beer–Lambert transmittance along a known path (Cycles; Stage deviation)
121121
- Freestyle SVG / line-set witness: Freestyle line set on a silhouette (full render pass; prefer Line Art first)
22.8 KB
Loading
23.4 KB
Loading

0 commit comments

Comments
 (0)