From ee132c93ac83c04453d4fc10c3312bb59af71db7 Mon Sep 17 00:00:00 2001 From: Nikolaus Gullotta Date: Tue, 6 Mar 2018 10:45:55 -0600 Subject: Initial check in of EditorHook script transparent_regions.lua --- scripts/transparent_regions.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scripts/transparent_regions.lua (limited to 'scripts') diff --git a/scripts/transparent_regions.lua b/scripts/transparent_regions.lua new file mode 100644 index 0000000000..7db81fb7af --- /dev/null +++ b/scripts/transparent_regions.lua @@ -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 \ No newline at end of file -- cgit v1.2.3