论坛帮助 |
社区圈子 |
日历事件 |
2022-09-28, 15:14 | 只看该作者 #19 | ||
|
|||
正式会员
等级: 四袋长老
|
#target 'illustrator' #targetengine com.adobe.illustrator.demo.flashplayer//目标软件是ai if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0 ) { for (var i = 0; i < app.activeDocument.selection.length; i++ ) { var lujing = app.activeDocument.selection if(lujing[i].typename == 'PathItem'){ pathRef = lujing[i]//循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } else if (lujing[i].typename == 'CompoundPathItem'){ pathRef = lujing[i].pathItems[0]//循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } else {break} } } |
||
2022-09-28, 15:25 | 只看该作者 #20 | ||
|
|||
正式会员
等级: 四袋长老
|
引用:
#targetengine com.adobe.illustrator.demo.flashplayer//目标软件是ai if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0 ) { for (var i = 0; i < app.activeDocument.selection.length; i++ ) { var lujing = app.activeDocument.selection if(lujing[i].typename == 'PathItem'){ pathRef = lujing[i]//循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } else if (lujing[i].typename == 'CompoundPathItem'){ pathRef = lujing[i].pathItems[0]//循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } else if (lujing[i].typename == 'GroupItem'){ for (j = 0; j < lujing[i].pathItems.length; j++){ if( lujing[i].pathItems[j].filled == true && lujing[i].pathItems[j].parent.typename != 'CompoundPathItem'){ pathRef = lujing[i].pathItems[j] //循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } } for (j = 0; j < lujing[i].compoundPathItems.length; j++){ if( lujing[i].compoundPathItems[j].pathItems[0].filled == true ){ pathRef = lujing[i].compoundPathItems[j].pathItems[0]//循环被选中的对象 pathRef.stroked =true;//添加描边 pathRef.strokeWidth= 0.1*2.834646;//粗细可以自己改 默认0.1mm pathRef.strokeColor=pathRef.fillColor;//描边颜色为填充颜色 pathRef.strokeOverprint = true//描边叠印 pathRef.strokeJoin = StrokeJoin.ROUNDENDJOIN //圆角拐点 } } } else {break} } } 你试试这个 |
||
2022-09-28, 15:45 | 只看该作者 #21 | ||
|
|||
正式会员
等级: 四袋长老
|
引用:
|
||