おうち用なので多少ぶさいくですが
任意の基準点があればそこを基準にぐるんぐるん回転します。
定規の単位どれでもオケーです。
function unitFunc(ary){
app.activeWindow.transformReferencePoint=["1pt", 0];
x= app.activeWindow.transformReferencePoint[0];
app.activeWindow.transformReferencePoint=ary;
return x;
}
var myruler = false;
if (app.activeDocument.viewPreferences.rulerOrigin != 1380143983) {
myruler = app.activeDocument.viewPreferences.rulerOrigin;
app.activeDocument.viewPreferences.rulerOrigin = 1380143983;
}
if(app.activeDocument.selection.length){
aa=app.activeDocument.selection[0];
tt=app.transformationMatrices.add(1,1,0,1,0,0);
bb=aa.rotationAngle;
cc=app.activeWindow.transformReferencePoint;
if(cc.length==2){
unitObj=unitFunc(cc);
dd=[[cc[0]*unitObj, cc[1]*unitObj],[0,0]];
} else{
dd=cc;
}
aa.transform (2021222766, dd, tt, undefined, undefined);
}
if (myruler) {
app.activeDocument.viewPreferences.rulerOrigin = myruler;
}
[12640] (z-) (2011/08/26 Fri 18:41)