Hello,
I'm trying to disable a Protection Tag's P, S, & R properties setting their dropdown menus to 'None.' The Script Log says it's as simple as tag()[c4d.PROTECTION_P] = 0
but this does not work in practice.
import c4d
def disableProtection(doc):
obj = doc.GetActiveObject()
tags = obj.GetTags()
for tag in tags:
if tag.GetType() == 5629 and tag.GetTypeName() == "Protection":
tag[c4d.PROTECTION_P] = 0
tag[c4d.PROTECTION_S] = 0
tag[c4d.PROTECTION_R] = 0
c4d.EventAdd()
if __name__=='__main__':
disableProtection(doc)
Can anyone explain what is going wrong? Thank you!