I never touched the settings, but I think I know how it works. So, take in mind that I might be wrong:
Darktable has a database, which contains the location of imported files, duplicates and all the metadata and edits. So, a few points:
- The original RAW file you imported should never be changed by Darktable. Just in case you were thinking that.
- Any edits you do, are always stored in the database.
Now, write sidecar file for each image
(in Settings → Storage) on import does exactly that. Darktable will create (or update) .xmp files for each imported file, when you import them. So if you start editing afterwards (and modifying tags or other metadata) they will not end up in the xmp file (automatically).
The after edit function does more what you want I guess: It means that after every edit you do (or after you leave the Darkroom mode, not sure) the .xmp file is created / updated and will contain any metadata updates and any edits you made. This is handy if you keep the xmp files together with the raw files in your backup / storage, that way you keep the edits you made to the file always together with the file. But the edits are written as ‘a description of what Darktable has done’, and that means that (most) other software can’t do anything with those edits. Maybe simple stuff like cropping or orientation, but mostly only tags and simple metadata.
never is self explanatory I guess, Darktable will just never touch any xmp files unless you do it manually.
Now, reading of xmp files is done one startup (if you enable the option in Settings → Storage) and maybe when you open a RAW file for editing again (not sure about that one).
This all has nothing to do with the metadata that is written to a jpg file if you export a jpg file from Darktable. I believe that will always contain metadata, and so always contains the edits as metadata. So as long as another program hasn’t stripped the Darktable-metadata from the file, you can manually do load sidebar file...
and then select a jpg that is written by Darktable.
In the Lighttable mode (photo picker mode as I call it), on the right side is a panel history stack
, and it has two buttons at the bottom: load sidecar file...
and write sidebar files
.
The ‘load sidecar file’ allows you to pick a xmp or jpg file to read the metadata and edits from. Handy when you saved multiple copies (with different filenames) and want to revert to something. Or when you want to try out edits from this forum.
‘write sidebar files’ will forcibly write xmp files for all the current selected images. You can’t change the filename (as far as I know), this will always be <base filename>.xmp
for any <base filename>.RAW
file, in the same folder.
So, back to your original question.
I don’t know ‘how you cannot figure it out’. It should do this by default I guess. You double click an image from the Lighttable mode, you end up in Darkroom mode and you make edits. Those edits are then saved to the database. So the next time you double click the same image again, it should open up with the edits you did last time.
Now, if you want to throw away your edits and reset it to a certain .xmp (or .jpg) file:
- In the Lighttable mode, select the image you want.
- In the right sidebar, in the panel
history stack
, you might want to click ‘discard history’ to throw away all your edits and reset the image back to defaults.
- Now you can click
load sidecar file...
and pick an xmp file or jpg file which contains Darktable edits. Now you can doubleclick the image again to open it in Darkroom mode and you’ll see the edits you just loaded.
(Instead of using ‘discard history’, there is also an ‘overwrite mode’ for loading a sidebar that does this in one go, but it’s set to ‘append mode’ by default. And discarding edits is always something I want to explain explicitly in case you do it by accident.)
If I compare to other rawconverters i know of:
- Lightroom / Adobe Camera Raw will not create .xmp files by default, but write them to their database. But a setting can be made to always write xmp files (so basically kinda like Darktable). I don’t know if there is a specific ‘load xmp file’ option though.
- DxO PhotoLab always writes in it’s own
.dop
file format. There is no database of edits, so if you throw away the file, you start over with the your edits. But they are always (over)written, so you can’t easily go back to a previous version of the edit, unless you made a copy of the .dop
file yourself.
- ON1 PhotoRaw writes it’s own sidecar files with edits, but they are primarily stored in the database (so sidecar files are there as ‘a safety’ thing). I don’t even know how to reset the edits and load edits from a sidecar file.
- Capture One writes it’s own sidecar files, I don’t know what they contain. But the edits are stored for sure in a Session / Database. I don’t know if it’s possible to reset the edits and read them from a sidecar file.
- Rawtherapee works purely with it’s own sidecar files. Edits are written to them, and you can overwrite or merge edits with those from a .pp3 file. A pp3 file has the option to conain multiple set of edits (snapshots) though, so trying things out doesn’t has to mean you have to mess with multiple sidecar files for a single image.
So I’m a bit struck by this comment, because I think this is far from intuitive and common in other software. They all have their own way of doing things.
It might also be that you are just looking for a ‘snapshot’ feature. A method of having one RAW file, but having multiple versions of edits for it, so you can try around and compare edits. In Darktable this is called a ‘duplicate’.
In the Lightroom mode, it can be done from the right sidebar, the selected image[s]
panel. There is a duplicate
button there. I call it ‘a virtual copy’.
In the Darkroom mode I recently learned, there is a duplicate manager
in the left sidebar. You’ll see previews of the other versions of the file, and you can click around to select them. I believe there is even a ‘mouse hover preview’ function by holding alt (and clicking? Not sure on this). And there is a duplicate
button to create a duplicate as is (from your current version), and an original
button to create a duplicate but start again from defaults.