2016-05-23 16:27:09 -04:00
|
|
|
ardour { ["type"] = "EditorAction", name = "Remove Unknown Plugins",
|
|
|
|
license = "MIT",
|
2016-07-12 09:21:23 -04:00
|
|
|
author = "Ardour Team",
|
2016-05-23 16:27:09 -04:00
|
|
|
description = [[Remove all unknown plugins/processors from all tracks and busses]]
|
|
|
|
}
|
|
|
|
|
|
|
|
function factory (params) return function ()
|
2016-07-02 18:05:02 -04:00
|
|
|
-- iterate over all tracks and busses
|
2016-05-23 16:27:09 -04:00
|
|
|
for route in Session:get_routes ():iter () do
|
2016-07-02 18:05:02 -04:00
|
|
|
-- route is-a http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Route
|
2016-05-23 16:27:09 -04:00
|
|
|
local i = 0;
|
|
|
|
repeat
|
|
|
|
proc = route:nth_processor (i)
|
2016-07-02 18:05:02 -04:00
|
|
|
-- 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
|
2016-05-23 16:27:09 -04:00
|
|
|
if not proc:isnil () and not proc:to_unknownprocessor ():isnil () then
|
|
|
|
route:remove_processor (proc, nil, true)
|
|
|
|
else
|
|
|
|
i = i + 1
|
|
|
|
end
|
2016-07-02 18:05:02 -04:00
|
|
|
until proc:isnil ()
|
2016-05-23 16:27:09 -04:00
|
|
|
end
|
|
|
|
end end
|