darktable
darktable copied to clipboard
Xmp export
This contribution adds in the preferences/storage/xmp section the option to write an xmp sidecar file "on export". This option is almost identical to the case where an xmp file is never written, except when an export of an image is explicitly requested. It fits a workflow where the work on a (raw) image is considered done only when an export (say of a jpg file) has been done. With this option, one can always be assured that the xmp is in line with the exported image (, without the risk that xmp-files being written unintentionally, as is currently happening).
The impact on the code is in three places:
- in data/darktableconfig.xml.in the option "on export" is added to the appropriate combo
- In common/image.c the (string)value of the option is handled, in the routine dt_image_get_xmp_mode(). . Note that it is not required to introduce another enum value. The new option corresponds to the existing value DT_WRITE_XMP_NEVER. In addition, a (new) boolean configuration variable "write_sidecar_on_export" is being used: its value defaults to FALSE, but set to TRUE when the user has selected the "on export" option.
- In libs/export.c, routine _export_button_clicked(), an if-statement is added to write the xmp files when the mentioned boolean variable has been set to TRUE.
Please never merge master into a topic branch. You can either let it as is (based on an older commit if it works) or rebase onto master. TIA.
If you want to be sure to keep dev info for a given exported image there is nothing better than the exported image itself (just make sure you export develop history).
@TurboGit Apologies. I wasn't aware of this. Do I need to re-submit?
This sounds like a useful feature. Pls can I suggest a modification? It sounds like I work in a similar way, perhaps plenty others do too. We want to be confident we have an XMP to match our output and not risk accidentally losing it by making further edits (I think) I always add some kind of subject words to my output file. I make an XMP with exactly the same file name as the output, outside dt. How about having the option in dt to do this automatically? That is, no need to affect the current "default" XMP file name or its processing/usage. Simply output an extra XMP named like the main output (eg jpeg). Your new option could be done in Preferences as you say, however, is it also an option to add it to the output module? Choices here are generally preserved across sessions. Just a thought.
can be effectively accomplished w/o additional coding. duplicate the image and do not work on the original. you will get an additional, different xmp file and the original xmp will not be altered. and no coding time necessary, just a minor adjustment in your workflow.
if you find this acceptable, please close this issue.
The duplicate doesn't seem to help. I've just tried it, I can see the XMP with 01 suffix, but that is just as much at risk from an accidental edit as with the original one, and of course it's not named to match the jpeg output. In any case, using a duplicates facility isn't appropriate in that logically I'm just processing one photo, there's just one instance for me. Also I can't see anything in lighttable to indicate that the duplicate is a duplicate (no change in the pop-up info for example).
I'm just making a suggestion. I can't close this pull request, it's not mine!
can be effectively accomplished w/o additional coding. duplicate the image and do not work on the original. you will get an additional, different xmp file and the original xmp will not be altered. and no coding time necessary, just a minor adjustment in your workflow.
if you find this acceptable, please close this issue.
Please note that this "on export" feature is an extension to the option when an XMP-file is "never" written. That is, no xmp-files will be written by default. Only when there is an export. I find it very disturbing and confusing to have xmp files littering around for images that I never edited. So the work-around you suggest (making a duplicate) is not addressing this issue. I don't want or need duplicates. I only want xmp-files for images that I actually modified.
Dear darktable code developers. I am a bit confused about the procedure following a pull request. As the original poster of this contribution, am I supposed to take any further action? Regards, Bertwim
This pull request did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please verify it has no conflicts with the master branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.
I will resubmit this contribution, as I think I did not handle the branches correctly.