Skip to content

Commit 6d3defc

Browse files
authored
Update amagalma_Smooth scroll arrange view left.lua
1 parent c18c5c5 commit 6d3defc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

View/amagalma_Smooth scroll arrange view left.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
-- @description Smooth scroll arrange view left
22
-- @author amagalma
3-
-- @version 1.01
4-
-- @changelog Auto-terminate and re-run script if shortcut key is held down
3+
-- @version 1.02
4+
-- @changelog No undo point creation when the view is already at the start of the project
55
-- @donation https://www.paypal.me/amagalma
66

77
reaper.set_action_options( 1|2 )
88

9+
local Set = reaper.GetSet_ArrangeView2
10+
local a0, b0 = Set( 0, 0, 0, 0, 0, 0 )
11+
if a0 == 0 then return reaper.defer(function() end) end
12+
913
local ret = tonumber(reaper.GetExtState("amagalma_Smooth Scroll", "scroll"))
1014
local scroll = ret and ret or 49
1115
ret = tonumber(reaper.GetExtState("amagalma_Smooth Scroll", "max_duration"))
1216
local max_duration = ret and ret or 400
1317

14-
15-
local Set = reaper.GetSet_ArrangeView2
1618
local total_frames = math.floor(max_duration / 31 + 0.5)
17-
local a0, b0 = Set( 0, 0, 0, 0, 0, 0 )
18-
if a0 == 0 then return end
1919
local total_shift = (b0 - a0) * scroll / 100
2020
local delta = total_shift / total_frames
2121

0 commit comments

Comments
 (0)