Skip to content

Commit 8cd10dc

Browse files
committed
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 f8d49cc.
1 parent f8d49cc commit 8cd10dc

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

official/apply_camera_style.lua

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ local PS <const> = dt.configuration.running_os == "windows" and "\\" or "/"
6060
-- command separator
6161
local CS <const> = dt.configuration.running_os == "windows" and "&" or ";"
6262

63-
-- tag name for changed images
64-
local changed_tag_name = "darktable|changed"
65-
6663
-- - - - - - - - - - - - - - - - - - - - - - - -
6764
-- A P I C H E C K
6865
-- - - - - - - - - - - - - - - - - - - - - - - -
@@ -316,7 +313,7 @@ local function normalize_maker(maker)
316313
return maker
317314
end
318315

319-
local function has_tag(image, tag_name)
316+
local function has_style_tag(image, tag_name)
320317

321318
local log_level = set_log_level(acs.log_level)
322319

@@ -390,19 +387,11 @@ local function apply_style_to_images(images)
390387
for i, pattern in ipairs(acs.styles[maker].patterns) do
391388
if string.match(model, pattern) or
392389
(i == #acs.styles[maker].patterns and string.match(pattern, "generic")) then
393-
local style_tag_name = "darktable|style|" .. acs.styles[maker].styles[i].name
394-
if not has_tag(image, style_tag_name) then
395-
local already_changed = has_tag(image, changed_tag_name)
390+
local tag_name = "darktable|style|" .. acs.styles[maker].styles[i].name
391+
if not has_style_tag(image, tag_name) then
396392
image:apply_style(acs.styles[maker].styles[i])
397393
no_match = false
398394
log.msg(log.info, "applied style " .. acs.styles[maker].styles[i].name .. " to " .. image.filename)
399-
if not already_changed then
400-
local ct = dt.tags.find(changed_tag_name)
401-
if ct then
402-
log.msg(log.debug, "detaching tag " .. changed_tag_name .. " from image " .. image.filename)
403-
image:detach_tag(ct)
404-
end
405-
end
406395
end
407396
log.log_level(loglevel)
408397
break

0 commit comments

Comments
 (0)