From 74534279cb2a3cffadb7b94b59ebe83b03c06d6b Mon Sep 17 00:00:00 2001 From: Christian Fillion Date: Thu, 12 Oct 2023 23:12:50 -0400 Subject: [PATCH] Update cfillion_Toggle track FX bypass by name.lua --- .../cfillion_Toggle track FX bypass by name.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tracks Properties/cfillion_Toggle track FX bypass by name.lua b/Tracks Properties/cfillion_Toggle track FX bypass by name.lua index fe4f32376..7aadb7c4c 100644 --- a/Tracks Properties/cfillion_Toggle track FX bypass by name.lua +++ b/Tracks Properties/cfillion_Toggle track FX bypass by name.lua @@ -1,7 +1,7 @@ -- @description Toggle track FX bypass by name -- @author cfillion -- @version 1.3 --- @changelog Search in the master track too [cfillion/reascripts#5] +-- @changelog Search in the master track too and add '/master' filter [cfillion/reascripts#5] -- @provides -- . -- [main] . > cfillion_Toggle track FX bypass by name (create action).lua @@ -29,6 +29,8 @@ end local function matchTrack(track, filter) if filter == '/selected' then return reaper.IsTrackSelected(track) + elseif filter == '/master' then + return reaper.GetMasterTrack(nil) == track else local _, name = reaper.GetTrackName(track, '') return name:lower():find(filter) @@ -42,7 +44,7 @@ local function prompt() end local ok, csv = reaper.GetUserInputs(script_name, 2, - "Toggle track FX bypass matching:,On tracks (name or /selected):,extrawidth=100", + "Toggle track FX bypass matching:,On tracks (name, /selected or /master):,extrawidth=100", ',' .. default_track_filter) if not ok or csv:len() <= 1 then return end