doc.pathItems return only selected layer path, not all.


trying iterate through pathitems in specific document, , not success.

just small script return "1" if select layer actual path. otherwise alway 0.

but need pathitems document.

 

cs5 extended (v12.1 x64).

mac os x 10.7.5

 

here test code:

#target photoshop app.bringtofront(); if (app.documents.length > 0) {     var doc = app.activedocument;      var res = "pathitems.length:\n";     res += doc.pathitems.length;      window.alert(res); } 

 

what doint wrong?

iteration still occur on 1 pathitem, 1 manually selected in photoshop.

selecting manually layers wont make difference.

 

king regards,

max

app.activedocument.pathitems.length gets number of pathitems of document + vector mask if activelayer has one.

to determine number of vector masks in documente guess have work through layers.



More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support