`rotate()`没有设置`BBAccumRotation`?

问题描述 投票:1回答:1

插画家使用BBAccumRotation跟踪对象的弧度0.51246700旋转。

BBAccumRotation IS设置为对象:

  • 当前正在旋转-弧度=旋转值
  • 先前旋转,当前处于0度-弧度= 0.000000
  • 通过拖动手柄旋转
  • 通过对象旋转>变换>旋转
  • 通过“属性”面板旋转>旋转

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);
    }

};

提前谢谢您:)

rotation adobe-illustrator extendscript object-tag
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.