mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
In Photoshop, when a path is selected in the Paths panel (the work path just drawn with the Pen or made from a selection, or a saved path), Layer > New Fill Layer > Solid Color/Gradient/Pattern and every new adjustment layer get a vector mask made from that path: a Solid Color fill with a vector mask is a shape layer, editable as a vector. The path wins over an active selection; with no path selected the selection becomes a layer mask (#1250), else there is no mask. PhotoCraft always used the selection and ignored the path, so Solid Color filled the whole canvas. Engine: the new fill and adjustment layer commands take an optional "path" param ("work", a saved path's name or a path object). The shared helper mask_new_layer turns it into the layer's vector mask and falls back to the selection mask without it; an unknown name is an error, not a panic. UI: run_command passes the path selected in the Paths panel as "path" (callers can opt out with "path": null). Drawing a work path with the Pen and Make Work Path select it, as in Photoshop, and clicking the panel's empty area deselects it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>