Reaper-Scripts/4PointCutting/4Pcut_set_dst-track.lua

22 lines
833 B
Lua

-- Reaper Scripts for 4 point editing. This script sets the Destination track and stores it to the rpp.
-- Only one (the first) selected track is used here.
-- Author: Ludwig Frühschütz
-- Source: https://www.eleton-audio.de
-- Git: https://files.eleton-audio.de/gitea/Ludwig/Reaper-Scripts.git
-- License: GPL v3.0
-- Requires: Reaper 5 or 6
-- Requires: This script goes with several other scripts that work closely together.
-- Send a message to the console
function msg(m)
reaper.ShowConsoleMsg(tostring(m) .. "\n")
end
-- START HERE vvvvvvv
if reaper.CountSelectedTracks(0) > 0 then
local first_sel_track = reaper.GetTrackGUID(reaper.GetSelectedTrack(0, 0))
reaper.SetProjExtState(0, '4PointCut', 'dst_track', first_sel_track)
else
reaper.ClearConsole()
msg('No track selected!')
end