Quote:
Originally Posted by Neutronic
Glad I could help!
Though if you would still prefer the script to open FX chains with last FX focused, you need to specify FX index in the RPR_TakeFX_Show() function. Otherwise, the script will not work as expected when you have more than 1 FX in a chain.
So the final script should look something like this:
Code:
from reaper_python import *
tracks = [RPR_GetSelectedTrack(0, track) for track in range(RPR_CountSelectedTracks(0))]
for track in tracks:
fxIDX = RPR_TrackFX_AddByName(track, 'Fabfilter pro-q 3', False, -1)
RPR_TrackFX_Show(track, fxIDX, 1)
Notice that for the sake of clarity I changed the success variable name to fxIDX, since that is what the function returns.
On the other hand, RPR_TrackFX_Show() does not return anything, so you don't need to assign its result to a variable.
|
Thanks. I modified all my scripts with what you suggested. I just added fxname variable to make it easy to change in the future. There is one that is failing.
Code:
from reaper_python import *
fxname = 'Volume Adjustment'
tracks = [RPR_GetSelectedTrack(0, track) for track in range(RPR_CountSelectedTracks(0))]
for track in tracks:
fxIDX = RPR_TrackFX_AddByName(track, fxname, False, -1)
RPR_TrackFX_Show(track, fxIDX, 1)
Any ideas on why this may be happening?