read_drawing
Reads a vector drawing's strokes as points, color, width, and bounds so you can see what's on an ink or vector level before adding to it. Use only_new to get just the strokes drawn since your last read.
Instructions
Look at a vector drawing as strokes, the user's included: what is on the level file right now. Works on ink and vector layers. Each stroke: index (drawing order, later = on top), by ('mcp' = drawn with stroke, 'other' = the user in OpenToonz or shapes), color, width px, closed, bbox [x0, y0, x1, y1] and points [[x, y, pressure], ...] along the line (canvas px, thinned to max_points). Use it before adding to someone's drawing, then preview_frame to see the result. only_new=true returns just the strokes that appeared since your last read_drawing or stroke on this drawing ('gone' counts the ones that disappeared): the quick way to see what the user just did.
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>"
},
"name": "read_drawing"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | ||
| layer | Yes | ||
| scene | Yes | ||
| only_new | No | ||
| max_points | No |