From 4ad9e77a7e0a0c86a9837e1212c7fd6ecdfe4787 Mon Sep 17 00:00:00 2001 From: Andy Chien Date: Thu, 22 Feb 2018 16:07:28 -0800 Subject: [PATCH] improved a few aspects of the hugin script: * handle stiching all from hugin_executor without the gui * automatically create the panorama file name based on first selected file plus _pano * automatically detects if output file exists, if so use an unique name * delete temporarily exported file --- contrib/hugin.lua | 51 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/contrib/hugin.lua b/contrib/hugin.lua index d69a8ad..9008b15 100644 --- a/contrib/hugin.lua +++ b/contrib/hugin.lua @@ -71,38 +71,59 @@ local function create_panorama(storage, image_table, extra_data) --finalize -- list of exported images local img_list + local img_set = {} -- reset and create image list img_list = "" - - for _,v in pairs(image_table) do + for k,v in pairs(image_table) do img_list = img_list ..v.. " " + table.insert(img_set, k) + end + + -- use first file as basename + table.sort(img_set, function(a,b) return a.filename