在 adobe illustrator 中随机旋转对象

ham*_*ali 0 random object rotation adobe-illustrator

如何在 Adob​​e Illustrator 中随机旋转对象。我想问你我如何旋转许多相同角度的选定对象并以随机角度旋转它们。

javascript 中 adobe illustrator 的脚本。

Vol*_*her 5

您选择的对象只是 Document.selection 中的一个数组,因此:

var min = Number(prompt("Minimum angle?","0"));
var max = Number(prompt("Maximum angle?","360"));

for(var i in activeDocument.selection){
    var angle = Math.floor(Math.random() * (max - min + 1)) + min;
    activeDocument.selection[i].rotate(angle);
}
Run Code Online (Sandbox Code Playgroud)