I just noticed, that AddProjectMarker2 doesn't allow putting two markers at the same position, when using the same name:
This doesn't work:
Code:
A=reaper.AddProjectMarker2(0, false, 30, 0, "one", -1, 0)
B=reaper.AddProjectMarker2(0, false, 30, 0, "one", -1, 0)
This however does work:
Code:
A=reaper.AddProjectMarker2(0, false, 40, 0, "one", -1, 0)
B=reaper.AddProjectMarker2(0, false, 40, 0, "two", -1, 0)
This happens also, when I create a region instead:
Code:
A=reaper.AddProjectMarker2(0, true, 60, 63, "one", -1, 0)
B=reaper.AddProjectMarker2(0, true, 60, 63, "one", -1, 0)
But not, if I make regionend smaller than regionstart:
Code:
A=reaper.AddProjectMarker2(0, true, 20, 3, "one", -1, 0)
B=reaper.AddProjectMarker2(0, true, 20, 3, "one", -1, 0)
So this is probably a bug. Especially, as the function doesn't give any feedback, that no marker was created. I need to get the count of markers before and after to get that something went wrong.
I also think, as putting existing markers at the same position is generally allowed by set-marker-functions and the ui, that such a limitation(if intended) wouldn't make much sense in the first place, imho...
Tested on Reaper 6.44x64 on Windows7
Edit:
I know, it's the bug-report section, but would it be possible to add to the retvals
- 1. the index of the newly created marker within all markers and regions(currently it only returns the shown index, so getting the other index is really difficult and challenging)
2. the guid of the created marker?
That would be a dream come true...