Perhaps someone will be so kind to help me with a problem that is described in more detail in this thread.
I would like to set the paramter “crop right” of the “raw black/white point” module for all images of a given camera model. I cannot use an auto preset, because that would fix the black level values, but these should be read from the exif data since they vary from image to image.
After RTFM and reading here I came up with the following (added to my luarc):
local dt = require "darktable"
local function set_crop_right_border_on_import(event, image)
if image.exif_maker == "OLYMPUS CORPORATION" and image.exif_model == "E-M5MarkIII" then
print("got there")
-- dt.gui.action("iop/rawprepare/crop right", "value", "set", 32)
end
end
dt.register_event("em5_iii_crop", "post-import-image", set_crop_right_border_on_import)
This works in the sense that “got there” is printed whenever an image is imported that was shot with that particular camera model. But if I uncomment the dt.gui.action line (I got it from darktable in shortcut definition mode), the program freezes.
Any ideas how to make this work?
Also, is registering “post-import-image” the right thing to do? Ideall, I’d like to reset the value also when resetting history, without reimporting. But I don’t see an event for that.
Thanks in advance…