From 8cd10dce68531895b6a9a21a9f156a8bafe9f2a6 Mon Sep 17 00:00:00 2001 From: Michael Reiger Date: Sun, 1 Jun 2025 12:50:59 +0200 Subject: [PATCH] Revert "Modified apply_camera_style script so that the application of a camera style does not mark the image as changed" because that attempt did not work. This reverts commit f8d49ccd017654801b77667963b0fa282c4c9bc1. --- official/apply_camera_style.lua | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/official/apply_camera_style.lua b/official/apply_camera_style.lua index 2675b67..b748ef9 100644 --- a/official/apply_camera_style.lua +++ b/official/apply_camera_style.lua @@ -60,9 +60,6 @@ local PS = dt.configuration.running_os == "windows" and "\\" or "/" -- command separator local CS = dt.configuration.running_os == "windows" and "&" or ";" --- tag name for changed images -local changed_tag_name = "darktable|changed" - -- - - - - - - - - - - - - - - - - - - - - - - - -- A P I C H E C K -- - - - - - - - - - - - - - - - - - - - - - - - @@ -316,7 +313,7 @@ local function normalize_maker(maker) return maker end -local function has_tag(image, tag_name) +local function has_style_tag(image, tag_name) local log_level = set_log_level(acs.log_level) @@ -390,19 +387,11 @@ local function apply_style_to_images(images) for i, pattern in ipairs(acs.styles[maker].patterns) do if string.match(model, pattern) or (i == #acs.styles[maker].patterns and string.match(pattern, "generic")) then - local style_tag_name = "darktable|style|" .. acs.styles[maker].styles[i].name - if not has_tag(image, style_tag_name) then - local already_changed = has_tag(image, changed_tag_name) + local tag_name = "darktable|style|" .. acs.styles[maker].styles[i].name + if not has_style_tag(image, tag_name) then image:apply_style(acs.styles[maker].styles[i]) no_match = false log.msg(log.info, "applied style " .. acs.styles[maker].styles[i].name .. " to " .. image.filename) - if not already_changed then - local ct = dt.tags.find(changed_tag_name) - if ct then - log.msg(log.debug, "detaching tag " .. changed_tag_name .. " from image " .. image.filename) - image:detach_tag(ct) - end - end end log.log_level(loglevel) break