View Full Version : making commands that are ignored in undo queue?
I'm wondering... is there a way to run commands but not have them acknowledged in the undo queue? Like for instance, if you have a slider that that do something whenever it's moved and you hold down the mouse and drag it around, the undo queue gets filled up with all these small changes, which is really annoying! Anyway to write mel stuff that bypasses the undo queue?
05-13-2003, 03:27 AM
hey, for scripts and such you can flip the undo que off for your operations (w/o a flush), and back on at completion ...but for a slider im not sure, as you can only call _after_ a change =(
hmm koolies, thnx! :D ahh, that's interesting to know... I was mainly hoping that there'd be a way to flip undo off without flushing, hooray!
09-26-2003, 12:44 PM
I also needed this, to be exact you need to use:
undoInfo -stateWithoutFlush off;
undoInfo -stateWithoutFlush on;
to turn it off and on without flushing the undo buffer. Nice!
...I would be careful with this feature though. The Maya API more or less assumes that the Undo restores the state to *exactly* the state it was in before the command... i.e. a command assumes that its environment *before* it undos itself is exactly as it was *after* it did whatever it did (a command is required to be able to undo itself if it alters the scene state).
Now if we're only talking about changing a parameter you're probably safe as long as this won't change DG connections or anything vital.
Just wanted to mention this.
01-15-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.