13
0
livetrax/share/scripts/_transparent_regions.lua

29 lines
641 B
Lua
Raw Permalink Normal View History

ardour {
["type"] = "EditorHook",
name = "Make all Regions Transparent",
2020-09-30 16:06:35 -04:00
author = "Ardour Team",
description = "While the transport is looping, all regions become transparent.",
}
function signals ()
return LuaSignal.Set():add (
{
[LuaSignal.TransportStateChange] = true,
[LuaSignal.TransportLooped] = true,
}
)
end
function factory ()
return function (signal, ref, ...)
local all_regions = ARDOUR.RegionFactory.regions()
for _, r in all_regions:iter() do
local ar = r:to_audioregion ();
if ar:isnil () then goto next end
if ar:opaque () then
ar:set_opaque (false)
end
::next::
end
2020-09-30 16:06:35 -04:00
end end