EDIT
a new SWS build fixes this.
The fix should be included in SWS v2.11.
Reproduce bug...
New project,
Add 1 track,
Add fx to track, show the fx chain, run the script below. Result is OK!
Now give track a name, run script, result = fx chain not found!
test code,
Code:
function Msg(str)
reaper.ShowConsoleMsg(tostring(str) .. '\n')
end
function Main()
local track = reaper.CSurf_TrackFromID(1, false)
if not track then reaper.MB('Track 1 NOT found!', 'Error',0) return end
local fxChain = reaper.CF_GetTrackFXChain(track)
if not fxChain then
-- try CF_GetFocusedFXChain
fxChain = reaper.CF_GetFocusedFXChain()
if not fxChain then reaper.MB('Unable to get track FX Chain window!', 'Error',0) return end
end
Msg(fxChain)
end
Main()
Windows 10 x64 (1909), REAPER v5.985/x64, SWS v2.10.0.1