Function to combine multiple undo entries into one undo block. For example, if your script inserts several elements into the program, you might want to be able to remove all the elements in one single undo operation. The function returns an ID for identifying the undo block. This ID can be used as second argument in later calls to startUndoBlock for combining the undo blocks that refer to this ID. The
name argument will be used as entry in the undo history. If multiple undo blocks are combined, only the name of the last undo block will be used. This function must be terminated using endUndoBlock. If startUndoBlock is called within a callback function, endUndoBlock is called automatically when the callback function ends.
Available in: Controller.
|name||This will be displayed as entry in the undo history.||string|
|id||Set this to combine the undo blocks that refer to this ID.||number|
Returns an ID that can be used to identify the undo block.
To use the following script:
- Download Program.vstpreset.
- Drag the preset on the MediaBay to import it to the user folder for VST presets.
- Create an empty program and add a script module.
- Paste the script into the text editor of the script module and execute the script.
- Check the entries in the undo history with and without undo block.