fix mistaken "do not roll" conclusion in TransportFSM::compute_should_roll()
[ardour.git] / scripts / post_export_save_hook.lua
1 ardour {
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",
6 }
7
8 -- subscribe to signals
9 -- http://manual.ardour.org/lua-scripting/class_reference/#LuaSignal.LuaSignal
10 function signals ()
11         s = LuaSignal.Set()
12         s:add ({[LuaSignal.Exported] = true})
13         return s
14 end
15
16 -- create callback functions
17 function factory ()
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)
25         end
26 end