View Single Post
Old 10-15-2018, 08:52 PM   #3
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

Until the bug is fixed, you can use this function to help you do the copying.

Code:
function CopyItemToPosition(track, item, position)
  retval, statechunk=reaper.GetItemStateChunk(item,"",false)
  newitem = reaper.AddMediaItemToTrack(track)
  reaper.SetItemStateChunk(newitem, statechunk, false)
  reaper.SetMediaItemPosition(newitem, 10, false)
  return item
end


CopyItemToPosition(reaper.GetTrack(0,1), reaper.GetMediaItem(0,0), 20)
-- first parameter the track,
-- second parameter is the MediaItem to create a copy from
-- third parameter, the position in seconds
--
-- it returns the newly created item
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote