darktable copy & paste

The documentation says:

mode
This setting defines how the paste actions behave when applied to an image that already has a history stack. In simple terms the “overwrite” mode deletes the previous history stack before pasting, whereas “append” concatenates the two history stacks together.

A copied history stack can have multiple entries of the same module (with the same name or different names) and pasting behaves differently for these entries in append and overwrite modes.

In append mode, […]

In overwrite mode the behavior is the same except that the history of the destination image is deleted before the paste operation commences. The “copy all”/“paste all” actions in this mode will precisely duplicate the copied history stack to the destination images (including any duplicate occurrences).

Note: If you use the “copy” button (copy all safe modules) followed by the “paste” button (paste all copied modules), the paste will always be done in overwrite mode, regardless of the setting of this parameter. Similarly when performing the same operation using keyboard shortcuts.
(darktable user manual - history stack)

However, this does not seem to be the case. I wonder if this is a problem in the documentation, or a problem in the implementation.

Here is how the top of the history stack of the target image looks:
image

And here is the history stack of the source image:
image

According to the text (see the parts in italics), if I do a Ctrl + C on the source image, followed by Ctrl + V on the target image:

  • the paste will always be done in overwrite mode
  • In overwrite mode […] the history of the destination image is deleted before the paste operation commences.

However, after copy + paste, the target image’s stack looks like this:
image

Entry #51 contrast equalizer was preserved, and everything below it. On top, I got:

  • highlight reconstruction
  • hot pixels
  • demosaic
  • denoise (profiled)
  • exposure
  • input color profile
  • color calibration
  • color balance rgb
  • sigmoid (inactive)
  • filmic rgb
  • local contrast.

If I repeat this with the mode explicitly set to overwrite, the target image ends up with a stack of 20 entries (the missing item is lens correction).

Should I raise an issue against the code base, the documentation, or my own understanding?

I think the ‘copy all’ action means using ‘copy’, and ‘paste all’ means ‘selective paste’ + selecting all items (see the description at the end of the copy operation: You can override all of these exclusions by using “selective paste…” and choosing which modules to paste to the target image(s)).

We are looking for help with the docs :wink:

Somewhat related question - why lens correction is not copied? Is it intentional or a bug? After copy-paste I always have to enable it.

Yes, but the question remains: are the docs wrong / in need of update, or is this a bug?

@Pascal_Obry , @hannoschwalm , would you know?

It’s intentional, see the manual. It’s settings, from one image to another, may not be safe to copy.

I turn it on for each new image via an automatically applied preset.

1 Like

I don’t know. This is why we’ve been asking for some form of documentation from the devs, but we haven’t got too much yet. Trying to document a feature when you don’t know exactly what is happening is difficult.

1 Like

I think it’s purposely not copied because you could copy settings that are correct for one image but not correct for another, as they are dependent on focal length, lens, focus distance etc… Though in most situations (if you’re just using automatic correction) it is probably safe.

1 Like

Yeah, copying automatic correction would be nice

I always use the ctrl+ shift+ C option to select what I want to copy and then if I deem it appropriate I copy lens correction. I personally never use the Ctrl + C option as I want to be in control of what is being applied to the next image.

1 Like

Yes, that would work, but I’m too lazy to select modules one by one every time :slight_smile:

I just tried two images, made duplicates and labelled them overwrite and append. I then used both the shortcut keys in LT and DR view and the button in LT and in each case it seems to have honoured the setting in place before the action, ie to append or overwrite so I think the manual statement might be incorrect.

that’s possible using selective copy or paste - you can specify if a module should be resettled in the copy.

1 Like

A copy&paste of a module’s setting generally passes all ‘parameters’. For almost all modules this is safe & correct.

The lens module is more tricky as there are restrictions. Just one example, if you copy embedded lens data to a lens/camera that does not have those, it would try to fallback to lensfun. It’s safe to copy&paste from one image to another on the same camera/lens combination.

In general, we don’t have a history copy&paste for a module doing “reset to defaults”.