I’m simulating some stuff in python, basically it’s a loop that runs through each frame of the animation, performing some actions.
At the start I usecmds.undoInfo(ock=1) and in the end cmds.unfoInfo(cck=1)
This way at the end of the simulation I can hit Ctrl+Z once and it does undo all of it, but the only problem is that it’s doing it frame by frame which is kind of slow.
Is there any way to speed it up, or is it just a limitation of undo in Maya?
It’s probably not fixable in that each of those operations (including the frame time changes) is still generating entries in the internal undo queue which need to be played back in order to get back to the state before the operation.
Maybe it would be simpler to write a tool that checkpoints the file before the op and then just reloads it if you don’t like the results?