reposting this in the bug reports forum, since I think it is a bug and I posted it wrongly in the JSFX forum first.
I don't expect the "Change FX preset: Track 1: ReaEQ" to appear in the undo history. It should be enclosed by the Undo Block. So it seems
a bug, that after the undo block is created, another undo entry is added for setting the preset. If you add multiple different TrackFX_SetPreset, a lot of undo entries are added.
code to test:
Code:
reaper.Undo_BeginBlock()
local track=reaper.GetSelectedTrack(0,0)
fxint=reaper.TrackFX_GetByName(track, "ReaEQ", true)
if fxint>=0 then
preset = reaper.TrackFX_SetPreset(track, fxint, "stock - Track Default")
end
reaper.Undo_EndBlock("Setting Preset", -1)
But it would be better if we could have an option in the reaper.TrackFX_SetPreset function to
completely skip the creation of undo entry.
something like:
boolean reaper.TrackFX_SetPreset(MediaTrack track, integer fx, string presetname, boolean createundo)
I've totally failed trying to make it not adding the undo. help!
thanks