Get which objects are changed during an undo/redo process

How to get the changed objects while the undo/redo operation is performed?

The objects changed will be the ones you changed in reverse order than you changed them… it just does everything you did backwards…