2 ["type"] = "EditorHook",
3 name = "Save Snapshot after Export",
4 author = "Ardour Lua Task Force",
5 description = "Save a session-snapshot on export, named after the export-timespan",
8 -- subscribe to signals
9 -- http://manual.ardour.org/lua-scripting/class_reference/#LuaSignal.LuaSignal
12 s:add ({[LuaSignal.Exported] = true})
16 -- create callback functions
18 -- callback function which invoked when signal is emitted
19 return function (signal, ref, ...)
20 -- 'Exported' passes 2 strings: current time-span name, path to exported file
21 -- (see C++ libs/ardour/export_handler.cc Session::Exported )
22 local timespan_name, file_path = ...
23 -- save session -- http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Session
24 Session:save_state ("export-" .. timespan_name, false, false, false)