"Knockout" is a blending option, turning a layer to a kind of a "mask" for all underlying layers except for the Background layer (more about).
To create this effect:
- Select a layer in the Layers list.
(On this screenshot, "Shape 1")
Now, in the "Knockout" menu you have to choose a knockout type - either "Shallow", or "Deep".
- The "Deep" knockout "punches through" all the layers except for the "Background". Visually, the "mask" gets filled with the "Background" layer's contents.
- If you want to stop the effect before (over) the "Background", choose in the "Knockout" menu the "Shallow" item, and then group the "masking" and the "masked" layers. In this case, the "mask" gets filled with the contents of the next layer after (under) the group.
- If you want to punch through the "Background" (to transparency), convert it to regular layer (Layer > New > Layer from Background) or just hide it by unchecking the "Visible" gadget.
- Once you have chosen the knockout method, the script automatically reduces the layer's fill opacity to zero. If you decide to show a "punched" layer contents, slightly increase this value with the "Fill" slider.
- To turn off the effect, select "None" in the "Knockout" menu or click the "Reset blending options" button.
Attention! When you apply the "Knockout" to a shape layer, the Custom Shape and other shape tools tend to remember the effect and apply it to follow-up shape layers. To resolve this, just click the "Reset blending options" button.
Please bear in mind that since the script can't define whether the current layer has the knockout effect or not, you have to keep track of this on your own.