[gimp] plug-ins: Try harder to export an image from darktable



commit 9888824730320e114001d02e3de2ef093a20319c
Author: Tobias Ellinghaus <me houz org>
Date:   Mon Apr 25 15:34:36 2016 +0200

    plug-ins: Try harder to export an image from darktable
    
    Before there wouldn't be any intermediate file being written when
    darktable sees more than one XMP file. Now the first image in its
    temporary database gets exported.

 plug-ins/file-darktable/export-on-exit.lua |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/file-darktable/export-on-exit.lua b/plug-ins/file-darktable/export-on-exit.lua
index 74c7a22..66066e4 100644
--- a/plug-ins/file-darktable/export-on-exit.lua
+++ b/plug-ins/file-darktable/export-on-exit.lua
@@ -43,8 +43,8 @@ local export_filename = dt.preferences.read("export_on_exit", "export_filename",
 dt.register_event("exit", function()
   -- safegurad against someone using this with their library containing 50k images
   if #dt.database > 1 then
-    dt.print_error("too many images, not exporting")
-    return
+    dt.print_error("too many images, only exporting the first")
+--     return
   end
 
   -- change the view first to force writing of the history stack
@@ -57,6 +57,7 @@ dt.register_event("exit", function()
   for _, image in ipairs(dt.database) do
     dt.print_error("exporting `"..tostring(image).."' to `"..export_filename.."'")
     format:write_image(image, export_filename)
+    break -- only export one image. see above for the reason
   end
 end)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]