Files
vectorcraft/crates/engine
dotCooCoo fe0c8da919 Scripts: layers and groups give their own path items
Layer.pathItems and GroupItem.pathItems now return a PathItems collection
for the paths directly in the layer or group, topmost first, as the Layer
and GroupItem pages describe them
(https://ai-scripting.docsforadobe.dev/jsobjref/Layer/,
https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/). Before, both
threw an error that said they were not available yet.

- The collection has the members of Document.pathItems. Its parent is the
  layer or group, and length, [i], index and getByName read only that
  container's paths, so a path inside a group, a compound path or a
  sublayer is not listed.
- add() and the shape creators put the new path on top of the layer's or
  group's contents and leave the current layer as it was. The path is
  made with the container's layer current (layer.setCurrent) and, for a
  group, moved into it with node.move, in the run's one undo step.
- VectorCraft's own rule: a layer or group that is hidden or locked, or
  that is in a hidden or locked layer or group, throws "Cannot add a path
  to a hidden or locked layer or group" and no path is made.
- The last four path lists stay cached while their documents are
  unchanged, so a loop over a large layer or group builds its list once.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-24 17:51:32 -08:00
..