What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Crazy question - Horw to get count of path anchor points?


How about a script to get the info :)

Code:
#target Photoshop
main();
function main(){
if(!documents.length) return;
try{
var Info = '';
var workPath = app.activeDocument.pathItems.getByName("Work Path");
for(var b =0;b<workPath.subPathItems.length;b++){
    Info += "Sub Path "+b +" Closed = "+workPath.subPathItems[b].closed;
 Info +="\rSub Path "+b+" has " +workPath.subPathItems[b].pathPoints.length+ " Pathpoints"+"\r";
    }
alert(Info);
}catch(e){alert("Unable to get path info");}
}

Man, that worked like a charm! Thanks a lot!


Now i know that for last work biggest path contains 1116 points (made manually) :D

P.S. And with script i found out that in last one i forget to close one subpath somehow. Corrected that of course.
 
Now now guys this is Photoshop, not some science class on rocket re-entry theories lol
 
Now now guys this is Photoshop, not some science class on rocket re-entry theories lol
But you can bring it to that level. Make own plugins etc.
For example, how PhotoMerge really works? I bet there's a lot of crazy mathematics.
 

Back
Top