Undo Entire JSFL Tool Action In One Step?
Is it possible to undo an entire JSFL tool's script with just one press of CTRL + Z?
For example, the following JSFL tool script allows a user to click on a shape and smooth it by running Animate's smoothSelection() method several times.
Each time the smoothSelection() method runs, an extra undo step is added to the history panel. So is there any way to reduce it to one step while keeping the same logic?
Thank you greatly for any assistance.
var doc = fl.getDocumentDOM();
function configureTool(){
var toolObj = fl.tools.activeTool;
toolObj.setIcon("ExampleTool.png");
toolObj.setMenuString("Example Tool");
toolObj.setToolName("Example Tool");
}
function mouseDown(){
point = fl.tools.penDownLoc;
doc.mouseClick({x: point.x, y: point.y}, false, false);
smoothClickedShape();
}
function smoothClickedShape(){
for (var i = 1; i <= 10; i++) {
doc.smoothSelection();
}
}
