13
0
livetrax/scripts/remove_unknown_procs.lua
Robin Gareus ff0e1ac79b update lua-scripts:
* add an inline spectrum display
* fix re-init HP/LP and Biquad
* add some comments, labels etc
2016-07-03 00:05:02 +02:00

26 lines
927 B
Lua

ardour { ["type"] = "EditorAction", name = "Remove Unknown Plugins",
license = "MIT",
author = "Robin Gareus",
email = "robin@gareus.org",
site = "http://gareus.org",
description = [[Remove all unknown plugins/processors from all tracks and busses]]
}
function factory (params) return function ()
-- iterate over all tracks and busses
for route in Session:get_routes ():iter () do
-- route is-a http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Route
local i = 0;
repeat
proc = route:nth_processor (i)
-- proc is a http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Processor
-- try cast it to http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:UnknownProcessor
if not proc:isnil () and not proc:to_unknownprocessor ():isnil () then
route:remove_processor (proc, nil, true)
else
i = i + 1
end
until proc:isnil ()
end
end end