Initial check in of EditorHook script transparent_regions.lua
This commit is contained in:
parent
a2af019c95
commit
ee132c93ac
28
scripts/transparent_regions.lua
Normal file
28
scripts/transparent_regions.lua
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
ardour {
|
||||||
|
["type"] = "EditorHook",
|
||||||
|
name = "Make all Regions Transparent",
|
||||||
|
author = "Ardour Lua Task Force",
|
||||||
|
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
|
||||||
|
end end
|
Loading…
Reference in New Issue
Block a user