I have a TagData Python plugin. It uses a loop to iterate all the children of the object it's applied to and changes their parameters after the hierarchy changes. All that happens in Execute().
I tried to wrap it all with usual Start/Add/EndUndo(). But.. It doesn't work.
I simplified the code to check how it works. So after the trigger action it simply changes the main node name.
doc.StartUndo() doc.AddUndo(c4d.UNDOTYPE_CHANGE, op) op.SetName("blah") doc.EndUndo() c4d.EventAdd()
It does not undo the name change back on user undo.
What am I doing wrong?