Skip to content

feat: add grease-pencil-rosette example (GPv3 attribute API drift witness)#57

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/grease-pencil-stroke
Jul 18, 2026
Merged

feat: add grease-pencil-rosette example (GPv3 attribute API drift witness)#57
TMHSDigital merged 1 commit into
mainfrom
feat/grease-pencil-stroke

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Adds examples/grease-pencil-rosette — five nested neon rose curves drawn entirely with the Grease Pencil v3 attribute-based API (layer → frames.new(1).drawingadd_strokes([counts]) → per-point position/radius/opacity/vertex_color). GPv3 is the largest bpy API break in the 4.x-to-5.x window and nothing in the gallery covered it; this is the strongest drift witness the gallery can hold.

API contract witnessed

  • The address break (version-gated, asserted on each side):
    • 4.5 LTS: GPv3 is bpy.data.grease_pencils_v3 (GreasePencilv3); bpy.data.grease_pencils still holds legacy GPencil whose frames carry .strokes and have no .drawing — the trap is asserted directly against a scratch legacy datablock, not just avoided.
    • 5.x: legacy is deleted; GPv3 owns the grease_pencils name; grease_pencils_v3 and bpy.types.GPencilStroke no longer exist.
  • Lazy attribute materialization: writing pt.radius/pt.opacity/pt.vertex_color through the point view creates radius, opacity, vertex_color (POINT) and cyclic (CURVE) layers in drawing.attributes with the expected domains/types.
  • Points are views over attributes: all 5×192 closed-form rose positions round-trip through the raw position POINT buffer via foreach_get (worst deviation observed: 5.9e-08).
  • Object type is GREASEPENCIL; bpy.data.materials.create_gpencil_data works identically on both versions.

Visual notes

Neon-sign composition: unlit (use_lights = False) tapered strokes, per-ring hue sweep cyan→violet→magenta→red, Standard view transform (AgX desaturates unlit saturated ink), a single area light painting a soft halo on the wall behind the rosette, floor horizon for grounding. Inspected at full 1280×720 and at thumbnail scale; nothing clipped, no visible lights, no blown highlights.

Integration

gallery.json entry, .cursor-plugin/plugin.json examples array, blender-smoke.yml step, README gallery row + counts (16→17), AGENTS.md/CLAUDE.md counts, ROADMAP candidate-pool follow-ups, regenerated docs/gallery/ via scripts/build_gallery.py. No release-owned version fields touched.

Test plan

Proven by live run (local):

  • Check-only path on Blender 5.1.2 — exit 0
  • Check-only path on Blender 4.5.11 LTS — exit 0
  • --output render on 5.1.2 (EEVEE) — hero/preview webp generated from the inspected render
  • python scripts/build_gallery.py — 17 detail pages, only expected files changed
  • JSON validity of gallery.json and plugin.json

Established by inspection only:

  • Manifest/count CI jobs (validate-counts, validate-manifest) — wired per convention, verified against the greps they use, but exercised only by this PR's CI
  • 4.5 render path (--engine cycles fallback) — code path mirrors bmesh-gear; check-only was live-run on 4.5

🤖 Generated with Claude Code

…ness)

Grease Pencil v3 is the largest bpy API break in the 4.x-to-5.x window and
nothing in the gallery touched it. This example draws five nested neon rose
curves through the attribute-based GPv3 surface and asserts the divergence
each version actually exposes: on 4.5 LTS GPv3 lives at grease_pencils_v3
while bpy.data.grease_pencils is still legacy GPencil (frame.strokes, no
.drawing); on 5.x legacy is deleted and GPv3 owns the grease_pencils name.
It also witnesses that stroke points are views over lazily materialized
attribute layers, round-tripping every closed-form position through the raw
POINT buffer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Jul 18, 2026
@TMHSDigital
TMHSDigital merged commit 2c4bdc4 into main Jul 18, 2026
9 checks passed
@TMHSDigital
TMHSDigital deleted the feat/grease-pencil-stroke branch July 18, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant