adds fix_sigma_foveon_dngs script#578
Conversation
| script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil | ||
| script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again | ||
| script_data.show = nil -- only required for libs since the destroy_method only hides them | ||
|
|
There was a problem hiding this comment.
create a namespace to contain the global variables and functions and then prefix sad_cameras, dt_fixed_tag and containse with it.
for example...
fsfd = {}
fsfd.sad_cameras =
fsfd.dt_fixed_tag =
function fsfd.contains(
| fix_image() | ||
| dt.tags.attach(dt_fixed_tag, image) | ||
| end | ||
|
|
There was a problem hiding this comment.
create a destroy function that destroys the darkroom-image-loaded event
local function destroy()
dt.destory_event("fix_sigma_foveon_dngs", "darkroom-image-loaded")
end
and then
scrpt_data.destroy = destroy
This lets the script be stopped and restarted without causing a problem because the event already exists.
|
|
||
| dt.register_event("fix_sigma_foveon_dngs", "darkroom-image-loaded", fix_on_load) | ||
|
|
||
| dt.print_log("[fix_sigma_foveon_dngs] loaded") |
There was a problem hiding this comment.
return script_data at the end of the script so that script_manager has access to the metadata and the destroy function.
Adds a lua script as a workaround for darktable-org/darktable#16586
cf. https://schallundstille.de/2025/04/04/fixing-foveon-dngs-in-darktable/