fotop
(james)
April 5, 2026, 3:14am
1
hi everyone, newbie here. i see that when people do edits in ‘play raw’ a .xmp file is added underneath. where do i send this and how can i read this file to access the history stack and follow the edit process? thanks in advance for your consideration.
james…
Terry
(Terry Pinfold)
April 5, 2026, 3:30am
2
The way I handle playraws is I have a folder called Photodownloads that I download people’s playraws to. In that folder I have a sub-folder called xmp. I download the xmp into that folder for easy location.
In DT darkroom view I use the duplicate manager to make an original duplicate.
Then in lighttable view I use the history stack module to load the sidecar file (xmp) to see how another person has edited the image.
Of course if you download the original posted image and xmp file together when the image opens in DT it will included the OP’s edits.
Other users may suggest a better way of handling the xmp files, but this works for me.
2 Likes
fotop
(james)
April 5, 2026, 7:06am
3
thank you Terry, i’ll try your method and see if my limited tech knowledge can fiure it…
Jetze
August 10, 2026, 4:43pm
4
I have a method very similar to Terry’s,
In my downloadfolder is a subfolder ‘playraw’
There I place both raws as .xmp’s, using ‘save target as’.
I usually do not download a lot of .xmp’s when I do I change their name adding a username to it.
In lighttable view I make a ‘duplicate’ and then I ‘load sidecar file’ to it.
Sometimes in darkroom I apply the username to the duplicate as well.
Masterpiga
(Daniele Pighin)
August 10, 2026, 5:31pm
5
In case you build from sources, you can also drag & drop XMPs directly in the darkroom:
master ← masterpiga:dnd_xmp
opened 06:44AM - 23 Jun 26 UTC
Adds support for dropping `.xmp` sidecar files onto the darkroom to apply their … edit history to the current image.
Fixes #21359.
**Behavior**
- **One sidecar:** a dialog offers to _replace the history_ of the current image, _create a duplicate_ and apply the history to it (then switch to it), or _cancel_.
- **Multiple sidecars:** a confirmation creates one duplicate per file, each with its history applied. Each duplicate is labelled with the sidecar's filename (via its version name) so the versions are easy to tell apart.
**Drop hints** While an external file drag hovers the darkroom, an overlay hint is shown on the center view (_"drop XMP sidecar files here…"_) and on the filmstrip (_"drop image files here…"_, the existing import target). Internal drags (thumbnail/module reordering) don't trigger it.
https://github.com/user-attachments/assets/693b1022-1ecf-43f5-bd17-a54ce4fe225b
## Implementation notes
The change touches two files: `src/views/darkroom.c` (the feature) and `src/common/history.c` (a deadlock fix it exposed).
**Drop target, scoped to the darkroom.** The center drawing area is shared across views, so the `text/uri-list` drag destination and its handlers are registered in `enter()` and torn down in `leave()` rather than at construction — this keeps the behavior darkroom-only and avoids leaking handlers onto a widget other views reuse. Only external URIs are accepted, so dropping a filmstrip thumbnail on the canvas is unaffected. The drop is filtered to existing `.xmp` files; everything else is ignored.
**Reuse over reinvention.** The feature is mostly glue over existing machinery: `dt_history_load_and_apply()` to read a sidecar into an image's history, `dt_image_duplicate()` to spawn duplicates, and the `Xmp.darktable.version_name` metadata (the same per-duplicate caption the duplicate module writes) to label them. Applying to the _current_ image relies on `dt_history_load_and_apply()`'s built-in darkroom reload; duplicates are non-current, so they don't reload and we switch to the single one explicitly so the result is visible.
**Deadlock fix (`history.c`).** `dt_history_load_and_apply()` grabbed the image-cache write lock and then, for the current darkroom image, called `dt_dev_reload_history_items()` _while still holding it_. The reload re-enters `dt_image_cache_get()` for the same image (e.g. from a module's `reload_defaults`), and that entry lock is non-recursive → hard hang. The fix moves the reload to after the cache lock is released. This was latent: existing callers (lighttable's "load sidecar file") only ever apply to non-current images, so the reload branch never fired — this PR is the first to apply a sidecar to the current darkroom image.
**Drag hints without a global hook.** We can't see the drag at the moment it starts (the app isn't focused yet), so the hint is driven by the `drag-motion`/`drag-leave` signals of the two drop targets (center + filmstrip thumbtable), which fire as soon as the pointer enters them. To distinguish a Finder drag from an internal reorder, we test `gtk_drag_get_source_widget(context) == NULL` — an in-app drag has a source widget, an external one doesn't. (An earlier attempt inspected the offered targets, but macOS's Quartz backend doesn't resolve those until drop time, so the hint never armed; the source-widget test is backend-agnostic and phase-agnostic.) A short timeout on `drag-leave` debounces the hand-off when the drag moves between the center and the filmstrip so the overlay doesn't flicker. The center hint is painted at the end of the view's `expose()`; the filmstrip hint via a `draw`-after handler on the thumbtable — so no changes to the shared `thumbtable.c`.
**Smaller things.** A shared `_darkroom_dnd_dialog_new()` builds the parented, centered, macOS-fullscreen-safe dialog used by both branches; the multi-duplicate loop is wrapped in one undo group (matching `dt_history_load_and_apply_on_list`) so the batch undoes in a single step; and batch results report how many succeeded.
Co-authored with Claude.
3 Likes