插画家使用BBAccumRotation
跟踪对象的弧度0.51246700
旋转。
BBAccumRotation
IS设置为对象:
BBAccumRotation
IS NOT设置为对象:
rotate()
通过脚本旋转问题是,是否有本机/内置方式将rotate()
设置为BBAccumRotation
?
虽然可以向对象添加BBAccumRotation
标记,但它会像对待任何自定义标记一样对待-Illustrator在其旋转标记处无法识别它,因此它不会反映在“属性”面板之类的地方。
我知道我可以使用自定义标签来跟踪rotate()
的操作-我宁愿不去那里。
似乎rotate()
应该设置为BBAccumRotation
,但我希望有一些我不知道的东西。
如果您有兴趣亲自查看,请参考以下测试脚本:
检查对象的标签:
if (app.documents.length == 0 ) {
alert('Open a document to run this script.');
} else if (app.activeDocument.selection.length != 1) {
alert('Select 1 object to run this script.');
} else {
TagAlert();
}
function TagAlert() {
var iDoc = app.activeDocument;
var aObj = iDoc.selection;
var nObj = aObj.length;
for ( i = 0; i < nObj; i++ ) {
var obj = selection[0];
var aTags = obj.tags;
var nTags = aTags.length;
if (nTags == 0) {
alert('No tags.')
} else {
for ( i = 0; i < nObj; i++ ) {
var obj = aObj[0];
var aTags = obj.tags;
var nTags = aTags.length;
for ( i = 0; i < nTags; i++ ) {
tagName = aTags[i].name;
tagVal = aTags[i].value;
alert(tagName + ' ' + tagVal);
}
} // for
} // if
} // for
}; // TagAlert
将对象旋转30度:
if (app.documents.length == 0 ) {
alert('Open a document to run this script.');
} else if (app.activeDocument.selection.length != 1) {
alert('Select 1 and only 1 object to run this script.');
} else {
RotateObject();
}
function RotateObject() {
var iDoc = app.activeDocument;
var aObj = iDoc.selection;
var nObj = aObj.length;
for(i = 0; i < nObj; i++) {
aObj[i].rotate(30);
}
};
提前谢谢您:)