stroke
Draw pen lines directly into an OpenToonz ink layer at a given frame. Each line is written into the vector level on top of existing artwork, so nothing is regenerated or overwritten.
Instructions
Draw by hand on an ink layer: each stroke is one pen line, written straight into the OpenToonz vector level on top of what is already there (yours or the user's). Nothing is regenerated or overwritten.
strokes: [{"points": [[x, y] or [x, y, pressure 0-1], ...], "width": px at full pressure (default: the style's line), "color": '#rrggbb', "closed": false, "smooth": true}]. Points are canvas px (origin top-left); the line passes through every point (smooth=false joins them with straight segments). Without pressure values the ends are tapered like a pen lift (taper 0 = none, 1 = to a hair). Work like an artist: read_drawing / preview_frame to look, add a few strokes, look again. Lines only: painted areas are made in OpenToonz, or with draw on a vector layer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene": "<scene>",
"layer": "<layer>",
"frame": "<frame>",
"strokes": "<strokes>"
},
"name": "stroke"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | ||
| layer | Yes | ||
| scene | Yes | ||
| taper | No | ||
| strokes | Yes |