grease-pencil-v3
Installation
SKILL.md
Grease Pencil v3 in Python
Trigger
Use this skill when the user:
- Creates Grease Pencil objects, layers, frames, or strokes from a script
- Mentions
grease_pencils,grease_pencils_v3,GreasePencil,GPencilStroke,drawing,add_strokes, or theLINEARTmodifier - Ports pre-4.3 GPencil code (frames that carry
.strokesdirectly) to 4.5 LTS or 5.x - Hits
AttributeErroronbpy.data.grease_pencils_v3(5.x), onframe.drawing(legacy data on 4.5), or on the Line Art modifier'sthickness(5.x) - Gets zero Line Art strokes and does not know why
High-level shape
GPv3 exists on both supported versions, but at different addresses. Branch on the bpy.app.version tuple, never on bpy.app.version_string.
import bpy