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
Post a Comment