Hi rmjmusic,
The fix is quite simple. Just move the bypassLink variable inside the callback function. Otherwise it refers to a zone that was found when the script loads. But the zone changes when you load new layer preset.
--LFO BYPASS LINKS
function onLFOBypassChanged()
local bypassLink = this.parent:getLayer():getZone()
if LFOBYPASSLINK == true then
bypassLink:getModulationMatrixRow(1):setParameter(655370, false)
bypassLink:getModulationMatrixRow(2):setParameter(655370, false)
bypassLink:getModulationMatrixRow(3):setParameter(655370, false)
bypassLink:getModulationMatrixRow(4):setParameter(655370, false)
else
bypassLink:getModulationMatrixRow(1):setParameter(655370, true)
bypassLink:getModulationMatrixRow(2):setParameter(655370, true)
bypassLink:getModulationMatrixRow(3):setParameter(655370, true)
bypassLink:getModulationMatrixRow(4):setParameter(655370, true)
end
end
defineParameter( "LFOBYPASSLINK", "LFO Bypass Link", true, onLFOBypassChanged)