Old 01-05-2019, 11:47 AM   #1
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,223
Default API: UndoExclude_Begin(), UndoExclude_End()

Sometimes I use functions, that'll create UndoPoints, even if it's not neccessary for ny script at all, spamming the UndoList for the user.
For that, I would love to exclude parts of my script from undo-management, with: UndoExclude_Begin(), UndoExclude_End()

That way, I could decide, what to include into an UndoState and what not.
That kind of precision is good for the user of the script, so I only Undo stuf necessary.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 01-05-2019, 02:30 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,795
Default

+1, could use this too
nofish is offline   Reply With Quote
Old 01-05-2019, 02:39 PM   #3
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,185
Default

+1, would use it!
Edgemeal is offline   Reply With Quote
Old 01-05-2019, 04:23 PM   #4
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 101
Default

+1 to this FR
nappies is offline   Reply With Quote
Old 01-20-2019, 02:08 PM   #5
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

+1 supporting
__________________
Donations | Mixing & Mastering Services
bFooz is offline   Reply With Quote
Old 01-21-2019, 02:29 AM   #6
andyp24
Human being with feelings
 
Join Date: Mar 2016
Posts: 656
Default

+1 please
andyp24 is offline   Reply With Quote
Old 04-29-2019, 01:45 PM   #7
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,380
Default

needs some love
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 04-29-2019, 01:55 PM   #8
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Posts: 524
Default

I'm not a scripter (which is rather obvious from my posts lol) but I just wanted to chime in from the user perspective here.

The average user runs a LOT of scripts. For everything. Larger ones like Track Inspector and LBX Stripper, smaller ones like Julian's amazing MIDI scripts, etc.

Having to undo literally several times because a script created an undo point is a complete workflow killer. If I do something simple like transpose an item and have to hit undo 3 or 4 times to actually undo the command I just did it becomes really really tedious.

So please consider Mespotine's suggestion of UndoExclude_Begin(), UndoExclude_End(). It is really, really necessary. Especially since scripting is now going to become part of theme customization in Reaper 6.
Klangfarben is offline   Reply With Quote
Old 04-29-2019, 02:06 PM   #9
andyp24
Human being with feelings
 
Join Date: Mar 2016
Posts: 656
Default

Yes please
andyp24 is offline   Reply With Quote
Old 04-30-2019, 06:20 AM   #10
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,046
Default

Yes - would make life so so much easier.

One of my scripts uses JSFX utility plugins. The easiest way to communicate with these is via the sliders (yes I know gmem can be used - but that can also be far fiddlier depending on what I'm trying to do).

As soon as I change a slider - unless I change it back within a certain (short) amount of time (again often requiring a bunch of annoying extra code to keep the functionality correct) - then unwanted undo points get created!

I want to be able to completely temporarily disable the undo system when I communicate with these utility JSFX - none of the changes ever want to be undone for these plugins. And then of course to re-enable the undo system once I'm done.

Would be awesome.
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal
lb0 is offline   Reply With Quote
Old 04-30-2019, 07:52 AM   #11
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,380
Default

Yes, huge fan of lb0's stuff! Pretty please
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is offline   Reply With Quote
Old 05-20-2019, 09:12 AM   #12
earhax
Human being with feelings
 
Join Date: Nov 2015
Posts: 171
Default

Yes, I too would love to see this functionality added. It is sorely needed for so many non-linear workflows where carefully managing undo history is really important.
earhax is offline   Reply With Quote
Old 05-20-2019, 09:26 AM   #13
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Posts: 524
Default

Pretty please? This is starting to become a real drag when running multiple scripts. As a user I almost get PTSD using undo now because I don't know how many times I will have to hit undo to actually undo the thing I want. Workflow killer from both a user and a scripter standpoint.
Klangfarben is offline   Reply With Quote
Old 05-20-2019, 11:49 AM   #14
Neutronic
Human being with feelings
 
Neutronic's Avatar
 
Join Date: Sep 2013
Posts: 313
Default

+1 it would be nice to have it in many scripting scenarios.
Neutronic is offline   Reply With Quote
Old 05-20-2019, 11:56 AM   #15
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,189
Default

+1
But maybe it is not easy to do. That is why we don't have it.
__________________
HeDaScripts for REAPER
heda is offline   Reply With Quote
Old 05-21-2019, 05:35 AM   #16
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,223
Default

Quote:
Originally Posted by heda View Post
+1
But maybe it is not easy to do. That is why we don't have it.
I think too. I would also imagine, that the whole undo-system in Reaper needs an extensive overhaul, as it's very shaggy in many ways (undoing stuff that's should not be part of the undo-point, mostly markers).
So I think, it would be worth several dev-cycles to get it right.

Nevertheless, as much as we can do with Reaper at this point, we definately need a stable way of undoing/not undoing things or it will become a mess further and further.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635

Last edited by mespotine; 06-03-2019 at 07:30 AM.
mespotine is offline   Reply With Quote
Old 06-02-2019, 09:11 AM   #17
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,296
Default

Quote:
Originally Posted by mespotine View Post
Sometimes I use functions, that'll create UndoPoints, even if it's not neccessary for ny script at all, spamming the UndoList for the user.
For that, I would love to exclude parts of my script from undo-management, with: UndoExclude_Begin(), UndoExclude_End()

That way, I could decide, what to include into an UndoState and what not.
That kind of precision is good for the user of the script, so I only Undo stuf necessary.
Aha!

So that is what is going on with all those strange undo entries filling up my buffer, even though I do not touch the JSFX, just start/stop playing. And when the buffer grows beyond 3 MB or so, Reaper starts to stutter on play (https://forum.cockos.com/showthread....28#post2141552).

Yes, this is very much needed.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian 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 09:12 PM.


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