Hello
The easiest way to make the engine perform multi-level undos, is to have it understand a simple scripted language. So that every 3D object is composed of a number of operations. e.g
A command to the engine might look like :
Rotate( -1, 45)
this being a simple rotation 45° anti-clockwise. To perform the Undo you would have to create an Undo 'engine' which would issue the opposite effect to the orignal command :
Rotate(1, 45)
Having the engine parse human readable commands will make your life far easier for debugging. You could of course keep issuing Undos until the object is removed and the script is empty, using this method would also allow Undo-ing to be available even after the object has been saved and reloaded.
Dudley Brooke