07-26-2012, 05:57 AM
|
#25
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by gofer
Didn't play with GetInstrument yet, but here is my first go at these, it inserts ReaComp on selected tracks or shows/hides it's UI if it already exists:
Code:
FX = "ReaComp"
TrackIdx = 0
TrackCount = RPR_CountSelectedTracks(0)
while TrackIdx < TrackCount:
track = RPR_GetSelectedTrack(0, TrackIdx)
fxIdx = RPR_TrackFX_GetByName (track, FX, 1)
isOpen = RPR_TrackFX_GetOpen(track, fxIdx)
if isOpen ==0:
isOpen = 1
else:
isOpen = 0
RPR_TrackFX_SetOpen(track, fxIdx, isOpen)
TrackIdx +=1
the isOpen part mimics the (new with pre3) open/close gui behavior of the stock "Insert/show ReaEQ (track EQ)".
Do we have any handle on insert slot order yet? I think it would be interesting to move plugins upward/downward in the chain. For example let the above script insert always in the first slot (after an instrument plugin if exists).
|
Thank you gofer!
|
|
|