Hello there !
I encounter a strange behavior with the SplitMediaItem() function from the API.
I have the following code :
Code:
local selItem = reaper.CountSelectedMediaItems(0)
local position = reaper.GetCursorPosition()
for i = 0, selItem-1 do
local item = reaper.GetSelectedMediaItem( 0, i )
local newItem = reaper.SplitMediaItem( item, position )
end
If I run it with 2 selected items, it only split the first one.
If I run it with 3, it only split the two first ones.
Obviously, I'd like to have all my selected items splited.
Am I doing something wrong here ?