Old 01-12-2018, 02:25 PM   #1
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,674
Default Action to clear undo

Is there a way to clear the undo history? (especially without prompt)

I have several actions that run on startup, but it means that if I open REAPER, then attempt to open an existing project, I'm given a warning that the (empty, default) project has been changed and asks if I want to save it.

I figure that clearing the undo history would solve this.


Cheers!
Dax


(Yes, I know it could be considered a 'dangerous' action/script. )
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia 9600, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 01-12-2018, 02:36 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,837
Default

What are the actions? Perhaps there's a way to avoid the undo points from being created in the first place.
cfillion is offline   Reply With Quote
Old 01-12-2018, 02:56 PM   #3
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,674
Default

One is to set the default state of an option that's used in a cycle action with toolbar button. (since cycle actions can't report their state)
The other two are actions to scroll the MCp and TCP to the selected track. (neither of which work for some damn reason, but I have hope they'll get fixed one day. (they're mostly there as reminders to me to keep checking on this.)
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia 9600, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 01-12-2018, 03:23 PM   #4
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,837
Default

Try running the actions from the __startup.lua script (in <resource folder>/Scripts). Some actions will persist in creating undo points though. If it doesn't work: which actions are they exactly and what are the names of the undo points that are created?

Code:
reaper.defer(function() end) -- disable the automatic undo point

reaper.Main_OnCommand(1234, 0)
reaper.Main_OnCommand(reaper.NamedCommandLookup('_S&M_CYCLACTION_1'), 0)
cfillion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.