From: Nikolaus Gullotta Date: Tue, 17 Jul 2018 20:16:04 +0000 (-0500) Subject: move new_playlist Lua script from mixbus and add some garbage collection X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=fa17364977030616072a0e5f35c9c024f5bf1899;p=ardour.git move new_playlist Lua script from mixbus and add some garbage collection --- diff --git a/scripts/new_playlist.lua b/scripts/new_playlist.lua new file mode 100644 index 0000000000..54563cd6a5 --- /dev/null +++ b/scripts/new_playlist.lua @@ -0,0 +1,17 @@ +ardour { + ["type"] = "EditorAction", + name = "New Playlist", + license = "MIT", + author = "Ardour Lua Taskforce", + description = [[Prompts and builds a new playlist for every track in the session.]] +} + +function factory () return function () + + for r in Session:get_tracks():iter() do + local rtav = Editor:rtav_from_route(r) -- lookup RTAV + Editor:new_playlists(rtav:to_timeaxisview()) + end + +collectgarbage() +end end diff --git a/scripts/reset_mixer.lua b/scripts/reset_mixer.lua index d4e0521b26..9b165f6af1 100644 --- a/scripts/reset_mixer.lua +++ b/scripts/reset_mixer.lua @@ -82,4 +82,5 @@ function factory() return function() end end ::end_script:: + collectgarbage() end end diff --git a/scripts/store_recall_mixer.lua b/scripts/store_recall_mixer.lua index f3c39275cb..f92d80ab01 100644 --- a/scripts/store_recall_mixer.lua +++ b/scripts/store_recall_mixer.lua @@ -403,5 +403,5 @@ function factory() return function() end end end - +collectgarbage() end end diff --git a/scripts/track_organizer.lua b/scripts/track_organizer.lua index 007b136356..e4d9765bed 100644 --- a/scripts/track_organizer.lua +++ b/scripts/track_organizer.lua @@ -101,6 +101,6 @@ function factory () return function () end end end - ::script_end:: + collectgarbage() end end