@@ -37,33 +37,32 @@ dt = require "darktable"
37
37
-- should work with darktable API version 2.0.0
38
38
dt .configuration .check_version (... ,{2 ,0 ,0 })
39
39
40
- dt .register_storage (" module_hugin" ," Hugin panorama" ,
41
- function (storage , image , format , filename ,
42
- number ,total ,high_quality ,extra_data )
43
- dt .print (" Export to hugin " .. tostring (number ).. " /" .. tostring (total ))
44
- end ,
45
- function (storage ,image_table ,extra_data ) -- finalize
46
- -- list of exported images
47
- local img_list
40
+ -- Register
41
+ dt .register_storage (" module_hugin" , " Hugin panorama" , show_status , create_panorama , nil , nil )
42
+
43
+ local function show_status (storage , image , format , filename ,
44
+ number , total , high_quality , extra_data )
45
+ dt .print (" Export to hugin " .. tostring (number ).. " /" .. tostring (total ))
46
+ end
47
+
48
+ local function create_panorama (storage , image_table , extra_data ) -- finalize
49
+ -- list of exported images
50
+ local img_list
51
+
52
+ -- reset and create image list
53
+ img_list = " "
48
54
49
- -- reset and create image list
50
- img_list = " "
51
-
52
- for _ ,v in pairs (image_table ) do
53
- img_list = img_list .. v .. " "
54
- end
55
-
56
- dt .print (" Will try to stitch now" )
57
-
58
- if coroutine.yield (" RUN_COMMAND" ," hugin " .. img_list )
59
- then
60
- dt .print (" Command hugin failed ..." )
61
- end
62
-
63
- end ,
64
- nil ,
65
- nil
66
- )
55
+ for _ ,v in pairs (image_table ) do
56
+ img_list = img_list .. v .. " "
57
+ end
58
+
59
+ dt .print (" Will try to stitch now" )
60
+
61
+ if coroutine.yield (" RUN_COMMAND" ," hugin " .. img_list )
62
+ then
63
+ dt .print (" Command hugin failed ..." )
64
+ end
65
+ end
67
66
68
67
--
69
68
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
0 commit comments