forked from ReaTeam/ReaScripts
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Restore ripple mode from persistent ExtState v1.0
- Loading branch information
1 parent
5535c8b
commit f1541ab
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Items Editing/mendel_Restore ripple mode from persistent ExtState.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- @description Restore ripple mode from persistent ExtState | ||
-- @author mendel | ||
-- @version 1.0 | ||
-- @about | ||
-- # Restore ripple mode from persistent ExtState | ||
-- | ||
-- This script works in conjunction with "Save ripple mode to persistent ExtState". These two scripts are intended to be used as bookends for custom actions which change the ripple mode programatically. This allows a custom action to proceed as expected, leaving the user experience of the ripple mode unchanged. | ||
|
||
function Restore_Ripple_State() | ||
RippleState = reaper.GetExtState("Ripple","RippleState") | ||
if RippleState=="A" | ||
then | ||
reaper.Main_OnCommand(40311,0,1) | ||
-- reaper.ShowMessageBox("Ripple Mode Restored: All Tracks", "Ripple Mode", 0) | ||
end | ||
if RippleState=="P" | ||
then | ||
reaper.Main_OnCommand(40310,0,1) | ||
-- reaper.ShowMessageBox("Ripple Mode Restored: Per Track", "Ripple Mode", 0) | ||
end | ||
if RippleState=="N" | ||
then | ||
reaper.Main_OnCommand(40309,0,1) | ||
-- reaper.ShowMessageBox("Ripple Mode Restored: Off", "Ripple Mode", 0) | ||
end | ||
end | ||
|
||
Restore_Ripple_State() |