Quickly delete all Tags with a specific ID. Super useful to clean up Scenes containing a lot of 3rd party and/or unnecessary Tags. Just copy and paste the code below and fill in your ids into the list “ids” -> line 7

import c4d
from c4d import gui

def KillTags(op):
    #ids = [1034693,1029989, 1036856] #Arnold-Ids
    #ids = [1029603,1029526,1029643,1029524,1029754] #Octane-Ids
    ids = [5612] #Phong

    for tag in op.GetTags():
        for id in ids:
            if tag.CheckType(id):
                doc.AddUndo(c4d.UNDOTYPE_DELETE, tag)
                tag.Remove()
    for child in op.GetChildren():
        KillTags(child)

def main():
    doc.StartUndo()
    for op in doc.GetObjects():
        KillTags(op)
    doc.EndUndo()
    c4d.EventAdd()

if __name__=='__main__':
    main()

To find your specific ID just drag and drop your Tag into the Console-Window (Shift+F10) and hit ENTER.

To find your specific ID just drag and drop your Tag into the Console-Window (Shift+F10) and hit ENTER.