Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 11-27-2018, 11:10 AM   #1
richardj
Human being with feelings
 
Join Date: Nov 2012
Posts: 178
Default Add option to not rename item on glue

In Options - Preferences - Editing behaviour add a checkbox called "Append '-glued' to glued item" that is checked by default.

When unchecking it items would no longer have -glued appended to them when gluing.

Why? Cos it's really annoying after you've recorded in some MIDI or been playing with a clip and want to set it to the desired length by gluing it and then it renames it from Dm7 to Dm7-glued and then you have to F2 and rename it back. Like Reaper pls, could you not every time.
richardj is offline   Reply With Quote
Old 11-28-2018, 07:31 PM   #2
Moy
Human being with feelings
 
Moy's Avatar
 
Join Date: Oct 2017
Location: China
Posts: 60
Default

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)
Moy is offline   Reply With Quote
Old 11-29-2018, 06:16 AM   #3
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 919
Default

you can create a custom action and assign it to G (for Glue)
Attached Images
File Type: jpg glue .jpg (11.8 KB, 177 views)
dupont is offline   Reply With Quote
Old 12-05-2018, 02:13 AM   #4
richardj
Human being with feelings
 
Join Date: Nov 2012
Posts: 178
Default

Moy, doesn't your script remove '-glued' from all items in the entire project, rather than just not append glued to the item you're currently working on?

That seems like dangerous code with global effects, when you start changing the names of things other people have set.
richardj is offline   Reply With Quote
Old 02-27-2019, 03:25 PM   #5
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 2,611
Default

Breeder's Glue Tools will do this, preserving item name, among other helpful things, such as gluing separately and including fades.

__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.