manage_filters
Manage the filter stack: op list | set_visibility | delete. list returns every filter on the photo (layers inside groups included), top of the stack first; it is the way to check what add_adjustment and add_effect produced and to find a filter's id for a re-edit. set_visibility switches one filter on or off without deleting it. delete permanently removes it (there is no undo). There is no apply op (creating or re-editing a filter is the job of add_adjustment and add_effect) and no reorder: delete and re-create the filters in the order you want.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | 'list' returns every filter on the image (including filters on layers inside groups), top of stack first, with layer/layer_id (which layer the filter lives on, and that layer's id), id/name/type/visible/mask/source and params. source "editmamei" = exact ledger record, with params in add_adjustment's own field names and units, so they can be passed straight back on a re-edit. source "readback" = a filter made outside Editmamei: it is listed as type "other" without its settings, and cannot be re-edited. 'set_visibility' toggles one filter without deleting it. 'delete' removes one. There is no 'reorder' — the editor has no API for it; delete and re-create the filters in the desired order instead. | |
| image | Yes | Image id, as returned by open_photo. | |
| visible | No | Required for set_visibility. | |
| filter_id | No | Required for set_visibility / delete. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| deleted | No | ||
| filters | No | ||
| visible | No | ||
| filter_id | No |