summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-03-06 10:45:55 -0600
committerNikolaus Gullotta <nikolaus.gullotta@gmail.com>2018-03-06 10:45:55 -0600
commitee132c93ac83c04453d4fc10c3312bb59af71db7 (patch)
tree94b4cf62fac14f207803fdaf27f1187bf9d8116f /scripts
parenta2af019c95243fb8ee738e7cdd240885ce4ee103 (diff)
Initial check in of EditorHook script transparent_regions.lua
Diffstat (limited to 'scripts')
-rw-r--r--scripts/transparent_regions.lua28
1 files changed, 28 insertions, 0 deletions
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