ofn-export-layers

This script is used to export all the image layers as separate files.

This script is called via the menu entry File > Export all layers.

Parameters

File name pattern

The file name pattern specifies how the layer files are named using specific layer data. In the pattern, names in braces are replaced by the values of these data for the layer. For instance, a pattern of Layer-{numDown1}.png will produce the name Layer-2.png for the 2nd layer from the top.

The available values are:

Hints:

The name pattern is actually directly used as a Python format specification, so modifiers can be used. The most useful modifier for numbers is the ability to define a minimal length with zero-padding. This is done by adding :0Nd to the variable name in the braces, for instance {numDown1:03d} will insert the row number on at least three digits, with zeroes added to the left if necessary: 001, 013, 099, 100.

Examples

Given an image with this layer structure:

Layers and Groups

.
├── Group1
│   ├── Layer2.png
│   ├── Layer4.png
│   └── SubGroup
│       └── Layer3.png
├── Group2
│   └── Layer5.png
├── Layer1.png
└── Layer6.png
.
├── Group1#Layer2.png
├── Group1#Layer4.png
├── Group1-SubGroup#Layer3.png
├── Group2#Layer5.png
├── Layer1.png
└── Layer6.png
.
├── Group1.png
├── Group2.png
├── Layer1.png
└── Layer6.png

where Group1 is the contents of Layer2+Layer3+Layer4 and Group2 is the contents of Layer5