mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Lua bindings to set group color
This commit is contained in:
parent
0b189a5766
commit
a55fb928a7
2 changed files with 13 additions and 0 deletions
11
scripts/s_group_color.lua
Normal file
11
scripts/s_group_color.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
ardour { ["type"] = "Snippet", name = "Randomize Group Colors" }
|
||||
|
||||
function factory () return function ()
|
||||
for grb in Session:route_groups ():iter () do
|
||||
local r = math.random (0, 255)
|
||||
local g = math.random (0, 255)
|
||||
local b = math.random (0, 255)
|
||||
local rgba = bit32.lshift (r, 24) + bit32.lshift (g, 16) + bit32.lshift (b, 8) + 0xff
|
||||
grp:set_rgba(rgba)
|
||||
end
|
||||
end end
|
||||
Loading…
Add table
Add a link
Reference in a new issue