24 lines
914 B
Lua
24 lines
914 B
Lua
-- Reaper Scripts for 4 point editing. This script selects the previous set destination track
|
|
-- 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 vvvvvvvvvvvvvvvvv
|
|
local track_str = ''
|
|
local retval
|
|
-- get the setting stored in rpp and select the track
|
|
retval, track_str = reaper.GetProjExtState(0, '4PointCut', 'dst_track')
|
|
if retval > 0 then -- variable exists in rpp
|
|
reaper.SetOnlyTrackSelected(reaper.BR_GetMediaTrackByGUID(0, track_str))
|
|
else
|
|
reaper.ClearConsole()
|
|
msg('Destination track not specified, using first track as default!')
|
|
end |