gimp_run_python
Execute Python code in GIMP 3 to automate image edits, call GIMP/GEGL APIs, and persist variables between calls.
Instructions
Ejecuta código Python dentro de GIMP 3 (API GObject: Gimp, Gegl, Gio, GLib ya importados).
Asigna la respuesta a la variable result (o usa print). Helpers disponibles:
_img(id) imagen, _item(id) capa, _drawable(img, id) capa activa, _color('#hex'),
_gegl(drawable, 'gegl:op', {props}), _pdb_run('proc', **args), _image_info(img), _undo(img).
Las variables persisten entre llamadas.
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": {
"code": "<code>"
},
"name": "gimp_run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |