PDA

View Full Version : making commands that are ignored in undo queue?


ceql
05-11-2003, 11:07 PM
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?

Thanks!

wrend
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 =(

ceql
05-13-2003, 03:32 AM
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!
:bounce: :bounce:

Marcel
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!

jdj
09-26-2003, 10:55 PM
Hi there

...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.

Cheers!
/ Daniel
:beer:

CGTalk Moderation
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.