Skip to content

Commit

Permalink
Release Deselect odd-numbered items from selected items v1.0 (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
milAgarr authored Jan 16, 2024
1 parent 9080e33 commit ea4bc16
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- @description Deselect odd-numbered items from selected items
-- @author KKKANTEN
-- @version 1.0
-- @about
-- タイトルの通り、複数選択したアイテムの奇数番目の選択を解除するスクリプトです。
-- アイテムを複数選択し、実行してください。
--
-- As the title suggests, this script deselects the odd-numbered items of multiple selected items.
-- Please select multiple items and execute. (machine translate)

local UNDO_STATE_ITEMS = 4

reaper.Undo_BeginBlock()
reaper.PreventUIRefresh(1)
for i = reaper.CountSelectedMediaItems(nil) - 1 & ~1, 0, -2 do
local item = reaper.GetSelectedMediaItem(nil, i)
reaper.SetMediaItemSelected(item, false)
end
reaper.UpdateArrange()
reaper.PreventUIRefresh(-1)
reaper.Undo_EndBlock('Deselect odd-numbered items from selected items', UNDO_STATE_ITEMS)

0 comments on commit ea4bc16

Please sign in to comment.