I have a Python Generator with an integer UserData. My code functions by adding markers based on the integer from my user data. Adding markers is working as expected. However deleting markers does not. I can't find anything in the API that deletes markers from the timeline. How would I do this? The only other option would be to delete all markers with command data. My code:
def GetMarkers(doc=c4d.documents.GetActiveDocument(), sort=True):
markers = 
thisMarker = c4d.documents.GetFirstMarker(doc)
while thisMarker is not None:
thisMarker = thisMarker.GetNext()
#Get a list of markers
markers = GetMarkers(doc)
#check if my user data integer is greater/less than the number of markers
if len(markers) < op[c4d.ID_USERDATA,1]:
c4d.documents.AddMarker(doc, None, c4d.BaseTime(len(markers)), 'name')
print 'add Marker'
elif len(markers) > op[c4d.ID_USERDATA,1]:
#Removing or del from Markers list doesnt work...
print 'delete Marker'
#Here I loop through the list and set the name,time, length, color etc. if needed
for i in range(0, len(markers)):