Undo/redo history
Undo/redo history
How I can use any command without adding it to undo/redo history ?
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Undo/redo history
I assume you want to disable the logging of the commands in a script?
If so look for "Disabling Command Logging Temporarily" on this page
If so look for "Disabling Command Logging Temporarily" on this page
Stay safe, sane & healthy!
Re: Undo/redo history
No. I want to perform operation (using script) not adding to undo/redo history.
For example: First i'm create cube and then im use custom operator. When i'm using ctrl+z (for undo). Softimage undoing cube creation instead of custom operator.
Sorry for english.
For example: First i'm create cube and then im use custom operator. When i'm using ctrl+z (for undo). Softimage undoing cube creation instead of custom operator.
Sorry for english.
Re: Undo/redo history
afaik, command has to be "registered" in order to undo the entire thing at once. Perhaps easiest way is to put your script into plugin, generated by XSI plugin wizard - it creates complete 'car hull' for your engine.
Re: Undo/redo history
in the script, you have to set the undo level to 0, which will clear the undo history and turn off the recording of undo.
you cannot just suspend undo recording temporarily without clearing the existing undo stack, because what's already in the undo queue cannot correctly work anymore.
you cannot just suspend undo recording temporarily without clearing the existing undo stack, because what's already in the undo queue cannot correctly work anymore.
- csaez
- Posts: 253
- Joined: 09 Jul 2012, 15:31
- Skype: csaezmargotta
- Location: Sydney, Australia
- Contact:
Re: Undo/redo history
There's a way to encapsulate your script into one big undo step by using the BeginUndo/EndUndo commands.
If you're using python it is possible to wrap this up as a convenient decorator or context manager, here is an old blog post about this (shameless plug).
Hope this helps,
Cheers
Code: Select all
Application.BeginUndo()
# YOUR CODE HERE
Application.EndUndo()
Hope this helps,
Cheers
Who is online
Users browsing this forum: No registered users and 19 guests