Skeleton for NI Maschine2 Surface
[ardour.git] / scripts / bypass_all_plugins.lua
1 ardour {
2         ["type"]    = "EditorAction",
3         name        = "Bypass Plugins",
4         license     = "MIT",
5         author      = "Ardour Team",
6         description = [[Bypass Plugins on selected tracks]]
7 }
8
9 function factory () return function ()
10         local sel = Editor:get_selection ()
11         for r in sel.tracks:routelist ():iter () do
12                 local i = 0;
13                 while 1 do -- iterate over all plugins/processors
14                         local proc = r:nth_plugin (i)
15                         if proc:isnil () then
16                                 break
17                         end
18                         proc:to_insert():deactivate()
19                         i = i + 1
20                 end
21         end
22 end end