Announcement

Collapse
No announcement yet.

Implementing UNDO

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Implementing UNDO

    How can I make sure that any action that I carry on in a script that changes containers or keyframes, is undoable?

  • #2
    So, should I assume that it is not possible to store previous states of containers, keyframes, channels, etc, to be able to perform an Undo, after a script is executed?

    Comment


    • #3

      I don't think there is an easy way around this, you have to 'record' every action you make in the script to an array and then when triggering the undo apply these actions

      Comment


      • #4
        How can I detect the Undo, to trigger the recorded actions, if I decide to implement that recording?

        Comment


        • #5
          I don't know a way to do that, I think maybe you should make your own 'undo' button in the script that will trigger the recorded actions

          Comment


          • #6
            Originally Posted by alonh View Post
            I don't know a way to do that, I think maybe you should make your own 'undo' button in the script that will trigger the recorded actions
            Thank you. I guess I will have to do that.
            Before starting coding in Viz, I did lots of coding in Cinema 4D and it was quite easy to store whatever I wanted in the Undo pool, so that the user could easily revert to the pre-script-execution state.

            Comment


            • #7
              I found these set of commands while searching for something else, looks like it could help
              I don't know how to trigger them but please share if they were helpful
              Attached Files

              Comment


              • #8
                Originally Posted by alonh View Post
                I found these set of commands while searching for something else, looks like it could help
                I don't know how to trigger them but please share if they were helpful
                Thank you. I will do some tests.

                Comment

                Working...
                X