Well.. I wrote a script before - to solve some problems like yours.
I modified it and maybe you could use it to delete all your items' "-glue" suffix together.
Hope it could be helpful
Code:
-- @description Remove all "-glue" part in take's name
-- @version 1.0
-- @author Moy
-- @changelog
-- + init
isDebug = false
local r = reaper;
-- Display a message box with a OK button
function Warn(msg)
reaper.ShowMessageBox(msg, "Warning", 0)
end
-- Some functions to do while things goes bad
local function nothing() end;
local function bla()
r.defer(nothing)
end
-- Start Processing...
r.Undo_BeginBlock()
all_items_count = r.CountMediaItems(0) -- 0 means active project
if all_items_count == 0 then
Warn("This project is empty.")
bla()
end
for i=0, all_items_count-1 do
local item = reaper.GetMediaItem(0, i)
--local take = reaper.GetTake(item, 0)
local takes = r.GetMediaItemNumTakes(item)
for j = 0, takes-1 do
local take = r.GetTake(item, j)
r.GetSetMediaItemTakeInfo_String(take, 'P_NAME', "", false)
take_name = r.GetTakeName(take)
match_result = string.match(take_name, ".*(.*[-glue].*)")
if match_result
then
new_take_name = string.gsub(take_name, match_result, '')
r.GetSetMediaItemTakeInfo_String(take, 'P_NAME', new_take_name, not isDebug)
end
end
end
-- Redraw the arrange view
r.UpdateArrange()
r.Undo_EndBlock("Remove glue suffix from take's name", -1)