PDA

View Full Version : Undo history


cmann_2000
09-05-2006, 02:08 PM
Is there a way to prevent LScripts from affecting the undo history? If I want to duplicate several items, for instance, it adds another action to the undo history. I want the LScript to only create a single step in the undo history. Thanks.

faulknermano
09-06-2006, 12:22 AM
in lw9, there is a undogroupbegin() and undogroupend() function. wrap these functions around the group of statements in your script and it will amount to one undo. only in lw9.

in lw8, i try to employ a copy/cut-undo-paste-into-storage-layer technique to buffer mesh data while keeping my history count back.

in your case, and in what i did with pointcloneextra, was to move the mesh (e.g. part of the features of the script) copy the mesh, undo the move, switch into an predefined 'storage' layer, paste the mesh, selhide() the objects for better response when later you have to switch back to it, move back to the main layer and repeat the cycle until everything is satisfied. when it is, switch to the storage layer, selunhide() to reveal all the pasted meshes and cut and paste that to the main layer.

the second option does not really address your question, but it is my way of getting being able to press 'u' and get rid of the operation.

cmann_2000
09-06-2006, 01:49 PM
Thanks, now I'm even more glad I upgraded to lw9 :)