Add Icon to ADM/BWF script, and preseed it

This commit is contained in:
Robin Gareus 2024-02-26 21:49:52 +01:00
parent 4acd0e9f29
commit 5880e51e92
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 15 additions and 1 deletions

View File

@ -1547,6 +1547,9 @@ LuaInstance::pre_seed_scripts ()
int id = 0;
pre_seed_script ("Mixer Screenshot", id);
pre_seed_script ("List Plugins", id);
#ifdef Mixbus
pre_seed_script ("Import ADM BWF File", id);
#endif
}
bool

View File

@ -2,7 +2,7 @@ ardour {
["type"] = "EditorAction",
name = "Import ADM BWF File",
author = "Ardour Team",
description = [[...]]
description = [[Load dynamic meta-data from an ADM file, import audio channels to the timeline and copy fixed settings for export.]]
}
function factory () return function ()
@ -132,3 +132,14 @@ function factory () return function ()
Session:surround_master():surround_return():set_bed_mix (true, rv['file'], imap:to_array ())
print ("OK")
end end
function icon (params) return function (ctx, width, height, fg)
local wh = math.min (width, height)
ctx:set_source_rgba (ARDOUR.LuaAPI.color_to_rgba (fg))
ctx:arc (0.5 * width - wh * 0.3, 0.5 * height, wh * .275, -0.5 * math.pi , 0.5 * math.pi)
ctx:close_path ()
ctx:fill ()
ctx:arc (0.5 * width + wh * 0.3, 0.5 * height, wh * .275, 0.5 * math.pi , 1.5 * math.pi)
ctx:close_path ()
ctx:fill ()
end end