Skip to content

5.8.0+agentic.12 - backtransform_point and retouch_update_shape Lua bindings

Choose a tag to compare

@rfordinal rfordinal released this 26 Jul 09:48
· 13 commits to agentic-mcp since this release

Fork of darktable 5.8.0 adding the darktable.develop Lua namespace used by darktable-mcp.

New in this build

  • dt.develop.backtransform_point(x, y[, len1][, len2]) - converts a processed/display-frame normalized point into the pipe-input frame darktable's masks are actually stored in, using the same dt_masks_get_image_size plus dt_dev_distort_backtransform path the GUI drag handlers use. Optional lengths (radius, feather) convert through a second offset point and normalize against mindim(iwidth, iheight), matching circle.c's own convention.

    Without this, a programmatically placed mask point lands wrong whenever orientation, crop, rotate or lens correction is active. An EXIF-portrait raw swaps width and height on its own, which was enough to move a target from a neck to a chest.

  • dt.develop.retouch_update_shape(...) - move or resize an existing retouch circle in place, keeping its formid, rather than delete plus recreate. Geometry commits through dt_dev_add_masks_history_item, the same mechanism as circle.c's own drag-commit.

Both are registered alongside the existing retouch_add_shape / delete_shape / list_shapes bindings and run on the GUI thread via dt_lua_gtk_wrap.