How to use external editor in Darktable?

Dear friends, I make a lot of use of Affinity Photo and Nik Collection in the workflow and I would like to know how to make them work together with Darktable. Can someone help me?

There is a lua script that will let you add up to I think 9 external programs… you can provide the command lines to run them in the configuration section once you run the script. It will add a dialogue to DT for you then to select which program. I will create a Tiff and do the exchange. I can confirm it works with Affinity Photo as I set it up but having said that I don’t use it…

EDIT:
image

run bottom one…

You will get this new option in LT or DT view

image

I have it set for ON1 and Affinity Photo

image

Enter the details in LUA options…

2 Likes

Where I find this script and how do I install it?

Do you have the script manager… you activate it from there… I think this is all installed by default but I am using Windows and things might be different for Linux and different builds or installs of DT??

1 Like

https://docs.darktable.org/usermanual/4.0/en/module-reference/utility-modules/lighttable/lua-scripts-installer/

https://docs.darktable.org/lua/stable/lua.scripts.manual/installation/

2 Likes

I use DT in Windows 11. I did not find any script manager in my installation.

I installed the git and the moon. after that, a lua directory and the luarc file containing require ‘tools / script_manager’ were created. What to do now?

Its been a long time since I did it…did you add the require script manager to the lurarc file?? and then maybe restart DT…

If you get the script manager just follow the directions to install the scripts and then enable the ones you want…

If I have time and you are still stuck @wpferguson Bill can help and or I will try to go on a virgin machine and do the steps as it has been some time and I might just give you the wrong adice :slight_smile:

1 Like

In llghttable view, script_manager will be in the left panel at the bottom.

  • Open it up.
  • Make sure action is set to start/stop scripts.
  • category should be set to contrib.
  • Use the arrows and go to the second page.
  • ext_editor should be the first entry.
  • Click on it to start it.
  • A new module will appear in the right panel named external_editors

Script Manager is documented here, darktable lua documentation - script_manager

External editors is documented here, darktable lua documentation - ext_editor

2 Likes

I wonder if you can still use this script, with flatpak applications? Or would the fact they are sandboxed between each other be the main issue?

Dear, after a lot of struggle to make script_manager work, I am now getting an error during execution, according to the images … “File Type not allowed”

Check the file type you have set up for the export. From the script code:

local allowed_file_types = {"JPG", "jpg", "JPEG", "jpeg", "TIF", "tif", "TIFF", "tiff", "EXR", "exr", "PNG", "png"}

If you are missing a file type please report, it is easy to extend the list.

I just checked here… It only opens the external editor if it is not a RAW file. I thought it would act like LR or C1 that exports RAW in TIFF format and then opens the file in the selected editor …

I haven’t tested it, but there is flatpak-spawn:

@wpferguson Is it possible to detect if we are in a flatpack sandbox? If yes we could add a flatpak-spawn automatically.

Inside the script is a documentation, how to use it:

-- setup --
      * in "preferences/lua options" configure name and path/command of external programs
      * note that if a program name is left empty, that and all following entries will be ignored
      * in "preferences/shortcuts/lua" configure shortcuts for external programs (optional)
      * whenever programs preferences are changed, in external editors GUI, press "update list"
    -- use --
      * in the export dialog choose "collection" and select the format and bit depth for the
        exported image
      * press "export"
      * the exported image will be imported into collection and grouped with the original image
      
      * in lighttable, select an image for editing with en external program 
      * (or in darkroom for the image being edited):
      * in external editors GUI, select program and press "edit"
      * edit the image with the external editor, overwite the file, quit the external program
      * the selected image will be updated
      or
      * in external editors GUI, select program and press "edit a copy"
      * edit the image with the external editor, overwite the file, quit the external program
      * a copy of the selected image will be created and updated
      or
      * use the shortcut to edit the current image with the corresponding external editor
      * overwite the file, quit the external program
      * the image will be updated
    
    * warning: mouseover on lighttable/filmstrip will prevail on current image
    * this is the default DT behavior, not a bug of this script
2 Likes

It does export in tiff format. I use it with Affinity Photo.

I could have sworn when I tried it the last time I forgot about creating the copy and just did edit and the file opened in Affinity develop persona… I had to remember to use export when done to save a tiff and then import that in to DT …I will have to try with a sony file when I get home…maybe I wasn’t paying attension…

I think we could just do a check_if_bin_exists on flatpak-spawn, since it runs inside the container. If it exists, then we are in a container and if not then we aren’t.

1 Like

I am a new darktable user. An excellent RAW editor in a number of areas. However, darktable might not be the preferred place to do ones final edits. There are other places for that like Gimp and Photoshop.

I was disappointed to see that there is no easy way to process and then export a RAW as a 16bit TIFF at 300ppi into Photoshop. Both ART and Rawtherapee are able to do this with a single click from the editing window. I think that this should be a basic function that’s built into darktable and not offered as a plugin. A plugin from what I understand might not be fully developed.

This is a major inconvenience within the program which if implemented could benefit so many darktable users.

Its there run the lua script and you will have a new module for this …you can have several editors

image