From dd2ee68e21709d193c724c11bea83533ce4f1b0a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 20 Feb 2019 16:47:51 +0100 Subject: [PATCH] Script to list and count plugins used in this session --- scripts/{_dump_plugins.lua => dump_plugins.lua} | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) rename scripts/{_dump_plugins.lua => dump_plugins.lua} (76%) diff --git a/scripts/_dump_plugins.lua b/scripts/dump_plugins.lua similarity index 76% rename from scripts/_dump_plugins.lua rename to scripts/dump_plugins.lua index 5d265b2da2..f27723576b 100644 --- a/scripts/_dump_plugins.lua +++ b/scripts/dump_plugins.lua @@ -1,9 +1,11 @@ -ardour { ["type"] = "Snippet", name = "Dump Plugins", +ardour { ["type"] = "EditorAction", name = "Dump Plugins", license = "MIT", author = "Ardour Team", + description = [[List and count plugins used in this session]] } function factory () return function () + local rv = "Plugins used in this session:\n | TYPE | NAME (ID)" local all_plugs = {} for r in Session:get_routes ():iter () do @@ -36,9 +38,13 @@ function factory () return function () for k,v in pairs (all_plugs) do print (string.format ("%2d * %-6s %-30s (%s)", v['cnt'], plugintypestr(v['type']), v['name'], v['id'])) + rv = rv .. "\n" .. string.format ("%2d * %-6s %-30s (%s)", v['cnt'], plugintypestr(v['type']), v['name'], v['id']) end + LuaDialog.Message ("All Plugins", rv, LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run() + all_plugs = nil + rv = "" collectgarbage (); end end