-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Summary
In darktable 5.2, a new module was introduced: external raster masks.
This module is a valuable addition, as it allows users to incorporate external raster masks into their image-editing workflows.
While experimenting with generating external raster masks through a Lua script, I found the current implementation of this module somewhat limited in terms of automation and mask management.
Current Behavior
At the moment:
- Darktable allows only a single global configuration to define the folder from which external raster masks are loaded.
- The process of selecting a specific external raster mask within the module cannot be automated through Lua.
- As the number of masks in the global folder increases, it becomes increasingly difficult to find and select the correct one — especially when multiple raster masks exist for a single image.
Proposed Enhancements
To make the external raster masks module more flexible and scriptable, I propose the following improvements:
-
Per-image mask folder setting
Allow the module to define the raster mask folder on a per-image basis, rather than relying on a single global folder. -
Lua API integration
Enable Lua scripts to:- Set the raster mask folder for the current image.
- Select a specific raster mask within the module programmatically.
Example Use Case
A Lua script could:
- Generate multiple raster masks for a specific image.
- Output these masks into a dedicated folder associated with that image.
- Set the External Raster Mask module to point to that folder.
- Automatically select one of the generated masks.
This would make it much easier for users to manage and switch between multiple masks associated with the same image, directly from within darktable.
Benefits
- Improved workflow automation through Lua.
- Easier mask management for complex image editing scenarios.
- Reduced clutter in the global mask folder.
- A more consistent and image-centric organization of raster masks.