The available values are:
- ANCHORPOINT
- LEFTDIRECTION
- LEFTRIGHTPOINT
- NOSELECTION
- RIGHTDIRECTION
// shows selected state of each anchor of the selected pathThe following another simple script selects every other anchor of the selected pathes.
var pi = activeDocument.selection[0];
var p = pi.pathPoints;
for(var i = 0; i < p.length; i++){
alert( p[i].selected );
}
(Grouped pathes and compound pathes are ignored.)
// selects every other anchor of the selected pathes.After running this script, you can apply the effect of tools only to the selected anchors.
var sel = activeDocument.selection;
var p, i;
for(var j = 0; j < sel.length; j++){
sel[j].selected = false;
p = sel[j].pathPoints;
for(var i = 0; i < p.length; i++){
if( i % 2 == 1 )
p[i].selected = PathPointSelection.ANCHORPOINT;
}
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.