Krita Run Python
krita_run_pythonExecute custom Python scripts in Krita to automate painting tasks, manipulate the active document, and access selection or view objects directly.
Instructions
Execute arbitrary Python inside Krita (escape hatch). The namespace provides: krita module, Krita/app, doc (active Document), view, InfoObject, Selection, QImage, os, json, math. print() is captured into the result's output field; assign to a variable named result to return a value (repr'd).
WARNING: executes unrestricted code inside the running Krita process. Only pass code you trust.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||