blender-grease-pencil
Blender Grease Pencil - traps
Every trap measured headless on Blender 5.1.2 (blender-round3 probes, 2026-11-08). Blender 4.3 replaced
Grease Pencil with GPv3; the 2.8-4.2 API is GONE, not deprecated. Still valid: bpy.data.grease_pencils.new(),
object type 'GREASEPENCIL', gp.layers.new(name), layer.frames.new(n), layer.blend_mode, onion skinning,
bpy.data.materials.create_gpencil_data(mat), stroke.material_index.
-
Strokes live on the frame's drawing. Wrong:
frame.strokes.new()(AttributeError: 'GreasePencilFrame' has no attribute 'strokes'). Right:d = layer.frames.new(1).drawing; d.add_strokes([n_points]); s = d.strokes[-1]. Verify:[(f.frame_number, [len(s.points) for s in f.drawing.strokes]) for f in layer.frames]. -
Points are added on the stroke and positioned with
position. Wrong:stroke.points.add(count=3),point.co. Right:stroke.add_points(n)(appends),point.position = (x, y, z)(object space). Verify: readp.positionback for every point. -
Thickness is per-point radius. Wrong:
stroke.line_width = 10(AttributeError). Right:point.radiusin world units; new points default to 0.01, so set it explicitly. Verify: readp.radiusback.