|
|
|
05-02-2019, 12:36 AM
|
#1
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Undo a Function within a Script
I need to undo a function from within a script ??
|
|
|
05-02-2019, 09:58 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Do you mean a script that's like
undo the next function
function functionname()
stop undoing this function
?
|
|
|
05-02-2019, 10:02 AM
|
#3
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
explain it a bit more please
reaper.Undo_BeginBlock2(ReaProject proj)
your function...
reaper.Undo_EndBlock2(ReaProject proj, string descchange, integer extraflags)
I see there is still no documentation for the extraflags
|
|
|
05-02-2019, 10:11 AM
|
#4
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
Quote:
Originally Posted by heda
I see there is still no documentation for the extraflags
|
It's at the bottom of reaper_plugin.h in the SDK.
|
|
|
05-02-2019, 10:22 AM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by cfillion
It's at the bottom of reaper_plugin.h in the SDK.
|
Thanks, will ad that to my docs then
|
|
|
05-02-2019, 01:11 PM
|
#6
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
I need to split the regions @ tempo markers to fit drums track then after it is fitted put the regions back as they were,
The function can be an internal or call another script, whatever will work.
|
|
|
05-02-2019, 01:20 PM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Do you have a script, that does all the splitting and fitting already?
Because in that case, you just would need to store the regions-information before the splitting.
After everything's done, delete all regions and recreate them with the information you got before.
You could even write two scripts:
1) who somehow store the region's information into extstate
then you do your stuff
2) who recreates the regions from the information stored into an extstate
Much easier than fiddling around with undo, as undo in Reaper has its issues...
|
|
|
05-02-2019, 01:26 PM
|
#8
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Like this
|
|
|
05-02-2019, 08:29 PM
|
#9
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Yes I think save regions then import.
I'm already using the Import one below for this Biab Drums script
and another Chordino chord import thanks to X-Raym !
X-Raym_Import markers and regions from tab-delimited CSV file.lua
X-Raym_Export markers and regions as tab-delimited CSV file.lua
I could call on them in the script, just need to Export to the Scripts\ReaTrak folder
and import from the ReaTrak folder silently in the background so there's no dialogs.
The below is in the Export script can I do way with that and have a set path ?
if not reaper.JS_Dialog_BrowseForSaveFile then
Msg("Please install JS_ReaScript REAPER extension")
else
Last edited by MusoBob; 05-02-2019 at 08:35 PM.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:24 PM.
|