(very simplified explanation of what my plugin performs )
My ObjectData plugin has some slider parameter ("myParameter") which controls the radius parameter of some sphere.
When the user changes myParameter, MSG_DESCRIPTION_POSTSETPARAMETER catches the message of its ID and calls the function void modifySphereRadius().
(in reality there are lot of "myParameters", "objects" and "modifyObjFunc()"s in my plugin).
At this step everything works fine.
Now I want to make a proper Undo/Redo operation.
I don't want to add AddUndo() operation (doc->AddUndo(UNDOTYPE::CHANGE, mySphere);) inside to my modifySphereRadius() function. It causes the problems during running animation (when myParameter is animated) etc.
So, what I've think, that it would be good to call my modifySphereRadius() function only when myParameter value is restored from the Undo.
Is the way to achieve this?
When the user changes myParameter, the C4D creates the undo-version of my node. And when the user calls Undo action, the old myParameter value of my node is restored.
BUT what I've found that no corresponding messages in the MSG_DESCRIPTION_POSTSETPARAMETER for the myParameter ID was sent.
Is the way to catch the message for the exact parameter ID after it was restored when user called Undo/Redo?