Copy link to clipboard
Copied
Hi there!
Is there a way to pause the history ?
I do not want to record the process of moving the layer in the history.
function proc()
{
var layerActive = app.activeDocument.activeLayer ;
pause history
layerActive.translate( mx, my ) ;
resume history
}
Or is there a way to move a layer without recording it ?
Thank you.
There's no history pause, but history suspend – which is a way to provide a single history state for the entire script (one single undo for all actions taken in the script)
app.activeDocument.suspendHistory('Secret step!', 'main()');
function main() {
// whatever needs to be done
}
Hope this helps,
Davide
Copy link to clipboard
Copied
There's no history pause, but history suspend – which is a way to provide a single history state for the entire script (one single undo for all actions taken in the script)
app.activeDocument.suspendHistory('Secret step!', 'main()');
function main() {
// whatever needs to be done
}
Hope this helps,
Davide
Copy link to clipboard
Copied
I see.
I just barely made it.
Thank you!