Skip to content

Commit 0457844

Browse files
committed
release Move selected items to a FIPM lane and Show ReaPack about dialog for the focused JSFX
1 parent b4109bf commit 0457844

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

Diff for: FX/cfillion_Show ReaPack about dialog for the focused JSFX.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- @description Show ReaPack about dialog for the focused JSFX
22
-- @author cfillion
3-
-- @version 0.1beta
3+
-- @version 0.1
44
-- @link https://cfillion.ca
55
-- @donation https://www.paypal.me/cfillion
66

@@ -41,7 +41,7 @@ if not ok then return end
4141
local name, type = ({function()
4242
local index = 0
4343
for type, file in chunk:gmatch("BYPASS %d+ %d+ %d+\n<([^%s]+) ([^\n]+)") do
44-
if index == fxidx then
44+
if index == fxidx & 0xFFFF then
4545
if type == 'JS' then
4646
if file:sub(1, 1) == '"' then
4747
return file:match('^"([^"]+)"'), type
@@ -65,5 +65,5 @@ if not owner then
6565
return ShowMsg(string.format("Documentation cannot be found because ReaPack does not know about the JSFX at '%s'.", name))
6666
end
6767

68-
reaper.ReaPack_AboutInstalledPackage(owner, 0)
68+
reaper.ReaPack_AboutInstalledPackage(owner)
6969
reaper.ReaPack_FreeEntry(owner)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-- @description Move selected items to a FIPM lane
2+
-- @version 1.0
3+
-- @author cfillion
4+
-- @website
5+
-- cfillion.ca https://cfillion.ca
6+
-- Request Thread https://forum.cockos.com/showthread.php?t=200756
7+
-- @donate https://www.paypal.com/cgi-bin/webscr?business=T3DEWBQJAV7WL&cmd=_donations&currency_code=CAD&item_name=FIPM+-+Move+selected+items+to+a+given+lane
8+
-- @about
9+
-- This script provides a set of two actions for moving the selected media
10+
-- items to the top or bottom FIPM lane of the track. Each lane is half of the
11+
-- track's height.
12+
--
13+
-- FIPM (Free Item Positioning Mode) is enabled on the tracks as required.
14+
-- @provides
15+
-- [main] . > cfillion_Move selected items to top FIPM lane (half track height).lua
16+
-- [main] . > cfillion_Move selected items to bottom FIPM lane (half track height).lua
17+
18+
local script_name = ({reaper.get_action_context()})[2]:match('([^/\\_]+).lua$')
19+
20+
reaper.Undo_BeginBlock()
21+
22+
for ii=0,reaper.CountSelectedMediaItems(0)-1 do
23+
local item = reaper.GetSelectedMediaItem(0, ii)
24+
local track = reaper.GetMediaItemTrack(item)
25+
26+
if reaper.GetMediaTrackInfo_Value(track, 'B_FREEMODE') ~= 1 then
27+
reaper.SetMediaTrackInfo_Value(track, 'B_FREEMODE', 1)
28+
end
29+
30+
local y, h = 0, 0.5
31+
if script_name:match('bottom') then
32+
y = 0.5
33+
end
34+
35+
reaper.SetMediaItemInfo_Value(item, 'F_FREEMODE_Y', y)
36+
reaper.SetMediaItemInfo_Value(item, 'F_FREEMODE_H', h)
37+
end
38+
39+
reaper.UpdateTimeline()
40+
reaper.Undo_EndBlock(script_name, -1)

0 commit comments

Comments
 (0)