mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-20 09:23:10 +01:00
Opening a PSD or PSB file with its layers as objects now applies a layer's Knockout setting instead of only counting it in a warning. The import options help page says that layers using a Knockout option are merged with the underlying layers: https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-from-other-apps/photoshop-import-options.html A layer or group inside a group whose `knko` value is 1 is read as a shallow knockout and merged with the visible layers below it in that group into one image, named after them with " + ". Where it has pixels (shaped by its layer mask), the layers below are cleared to transparency and it is drawn there at its fill opacity; its opacity then fades the result back toward the layers below. In a pass-through group the cut shows what is outside the group, and the knockout is applied only when it and the visible layers below it are in the Normal mode, so that no layer stops blending with what is outside the group. The knockouts of top-level layers, clipped layers, layers that others are clipped to, other `knko` values, and merges that would need more memory than allowed are not applied: those layers come in as before and the existing warning counts only them. A hidden knockout that would need the merge is left out, like other hidden layers that need a merge. A knockout that draws nothing, or has nothing visible below it, merges nothing and comes in as before.