add_gp_stroke
Draw a single Grease Pencil stroke from local-space points, with optional layer, frame, radius taper, material, and cyclic closure for 2D drawings or animation.
Instructions
Draw one stroke in a Grease Pencil object.
Points are in the object's local space. cyclic closes the outline.
Args: object_name: Grease Pencil object (from create_grease_pencil). points: 2 to 10000 points, each [x, y, z]. layer: Layer to draw on; empty uses the active layer, a new name creates it. frame: Keyframe to draw into (drawings per frame make 2D animation). radius: Stroke radius in metres, one value or one per point (0.0001 to 10). Varying it tapers the line. cyclic: Close the stroke back to its first point. material: Grease Pencil material (create_gp_material); empty uses the object's first material.
Returns: Dict with the layer, frame and stroke count on that frame.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | ||
| layer | No | ||
| cyclic | No | ||
| points | Yes | ||
| radius | No | ||
| material | No | ||
| object_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||