4. Layer Groups

Layer Groups are available in GIMP 2.8 and newer.

You can group layers that have similarities in a tree-like way. So, the layer list becomes easier to manage.

Create a Layer Group

You can create a layer group by clicking the New Layer Group button at the bottom of the layers dialog,

through LayerNew Layer Group, or through the Layers dialog context menu.

This empty layer group appears just above the current layer. It is recommended to give it a name that is descriptive. To change the layer group name, double-click the name, or press F2 the name, or right-click it and then select the Edit Layer Attributes in the context menu. If you don't rename your layer groups, you will get confused when several are created with names such as Layer Group #1, Layer Group #2, etc.

You can create several layer groups and you can embed them, that is include a layer group in another one.

Adding Layers to a Layer Group

You can add existing layers to a layer group by click-and-dragging them.

[Note] Note

The hand representing the mouse pointer must turn smaller before releasing the mouse button.

A thin horizontal line marks where the layer will be laid down.

To add a new layer to the current layer group, click the New Layer... at the bottom of the Layers dialog, or use the New Layer command in the image menu or press Shift+Ctrl+N.

When a layer group is not empty, a small > icon appears. By clicking it, you can fold or unfold the layer list.

Layers that belong to a layer group are slightly indented to the right, allowing you know easily which layers are part of the group.

Visibility

If a layer group is made invisible using the eye icon but still open (so that the layers inside the group are shown in the list), there is a struck out eye shown besides the layers that are inside the group to indicate that these layers are not displayed in the final projection of the image, but theoretically visible in the layer group.

Raise and Lower Layer Groups

You can raise and lower layer groups in the Layer dialog as you do with normal layers: click-and-dragging, and by using up arrow and down arrow keys at the bottom of the Layer dialog.

Duplicate a Layer Group

To duplicate a layer group, click the Create a duplicate of the layer button or right-click and select the Duplicate Layer command in the pop up context menu.

Move Layer Groups

You can move a layer group to another image by click-and-dragging. You can also copy-paste it using Ctrl+C and Ctrl+V: then, you get a floating selection that you must anchor (anchor button at the bottom of the Layer dialog).

You can also move a layer group to the canvas: this duplicates the group in the group. Chain all layers in the duplicated layer group, select the Move tool, then, in the image, move the layer. That's one way to multiply multi-layer objects in an image.

Delete a Layer Group

To delete a layer group, click the red cross button at the bottom of the Layer dialog or right-click and select Delete layer.

Embed Layer Groups

When a layer group is activated, you can add another group inside it with the Add New Layer Group command. There seems to be no limit, excepted memory, to the number of embedded layer groups.

Layer Modes and Groups

A layer mode applied to a layer group acts on layers that are in this group only. A layer mode above a layer group acts on all layers underneath, outside and inside the layer groups.

Original image

Figure 8.29. Layer Mode in or out Layer Group

Layer Mode in or out Layer Group

We added a white layer in the layer group with saturation mode: only square and triangle are disabled.

Layer Mode in or out Layer Group

We added a white layer out of the layer group with saturation mode: all layers underneath are disabled, including the background layer.


With GIMP 2.10 and newer, layer groups have a special layer mode: the Pass Through mode. This mode exists only if a layer group is active.

When this mode is used instead of any other one, layers inside the layer group will behave as if they were a part of the layer stack, not belonging to the group. Layers within the group blend with layers below, inside and outside the group.

While with Normal mode, layers within a group are treated as if they were a single layer, which is then blended with other layers below in the stack; a modifier on a layer inside the group blends layers below in the group only.

More details about Pass Through in Pass-through .

Opacity

When a layer group is activated, opacity changes are applied to all the layers of the group.

Layer Mask

With GIMP 2.10 and newer, masks on layer groups are possible. They work similarly to ordinary-layer masks, with the following considerations.

The group’s mask size is the same as group’s size (i.e., the bounding box of its children) at all times. When the group’s size changes, the mask is cropped to the new size — areas of the mask that fall outside of the new bounds are discarded, and newly added areas are filled with black (and hence are transparent by default).

Of course, you still can add a layer mask to a layer in the group to mask a part of the layer:

We added a white (Full opacity) layer mask to the triangle layer.

Finding a layer

When working with a lot of layers, finding a particular layer in the list may be difficult. With GIMP 2.10.10 and newer, a new on-canvas layer selection function is available. Alt+middle click the image element you want to find the layer this element belongs to: the available layers will be looped through to show the new active layer and the layer name will be temporarily displayed in the status bar.

Layer preview

There were problems with drawable preview rendering in the case of a large image consisting of many layers. This problem is fixed with GIMP 2.10.10 and newer, except for layer groups. You can disable rendering layer group previews in EditPreferencesInterface.