General Category > ASL Scripts
Undo support for scripts
nemyax:
What's the situation with undo support for scripted actions? Apparently they cannot generally be undone, but polyGon_tError mentions that some script of his is fully undoable. How does it really stand? Are there plans to change it?
Steve:
Adding a well designed, general Undo for scripts is an enormous task. You can literally change anything an Object. Simply saving a copy of the entire Object, all materials, etc. is less work but that would be a rather inelegant solution and would use a great deal of memory.
tazdij:
What about a function that a script can leverage to set a checkpoint? Then in your script VM, track the commands issued from that point. Just an idea, without knowing how this is implemented I really don't know what the options are.
Unobtainium:
I'd say an inelegant undo function is better than no function.
Steve, what about one of the following:
- Save everything at each point in the Undo history and let the user choose between keeping it in RAM OR on the HDD/SSD. I'm on 32 GB RAM but wouldn't really mind Anim8or having to load from disk if it meant the Undo support would at least be there.
- More work, but; an Undo system that saves the differences, aka delta-patching of sorts. Could still have the choice of keeping history in RAM or on the disk.
- As tazdij suggests; track every command & script with their used parameters (run them in a macro-like fashion upon undo / redo, would be problematic with very demanding scripts timewise, though)
Could at least be a temporary solution, I'm sure users would like just having the possibility to undo scripts at all. :)
nemyax:
Incidentally, which would be more work: a C API that supports Anim8or's native undo, or an undo-enabled script VM? =)
Navigation
[0] Message Index
[#] Next page
Go to full version