Advertisement
gr4ph0s

RemoveLightListerTag

May 1st, 2018
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import c4d
  2.  
  3. def RemoveTag(obj):
  4.     tagIds = (1039151, 1039117, 1039167)
  5.     tags = obj.GetTags()
  6.     for tag in reversed(tags):
  7.         if tag.GetType() in tagIds:
  8.             doc.AddUndo(c4d.UNDOTYPE_DELETE, tag)
  9.             tag.Remove()
  10.  
  11. def IterateScene(obj):
  12.     while obj:
  13.         IterateScene(obj.GetDown())
  14.         RemoveTag(obj)
  15.         obj = obj.GetNext()
  16.        
  17. def main():
  18.     doc.StartUndo()
  19.     IterateScene(doc.GetFirstObject())
  20.     doc.EndUndo()
  21.     c4d.EventAdd()
  22.  
  23. if __name__=='__main__':
  24.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement