Gimp.GroupLayer

g GObject.Object GObject.Object Gimp.Item Gimp.Item GObject.Object->Gimp.Item Gimp.Drawable Gimp.Drawable Gimp.Layer Gimp.Layer Gimp.Drawable->Gimp.Layer Gimp.GroupLayer Gimp.GroupLayer Gimp.Item->Gimp.Drawable Gimp.Layer->Gimp.GroupLayer

Subclasses:

None

Methods

Inherited:

Gimp.Layer (37), Gimp.Drawable (55), Gimp.Item (55), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_by_id (layer_id)

class

new (image, name)

merge ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gimp.Item (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gimp.GroupLayer(**kwargs)
Bases:

Gimp.Layer

Abstract:

No

Structure:

Gimp.GroupLayerClass

Operations on a group layer.

classmethod get_by_id(layer_id)
Parameters:

layer_id (int) – The layer id.

Returns:

a Gimp.GroupLayer for layer_id or None if layer_id does not represent a valid group layer. The object belongs to libgimp and you must not modify or unref it.

Return type:

Gimp.GroupLayer or None

Returns a Gimp.GroupLayer representing layer_id. This function calls Gimp.Item.get_by_id() and returns the item if it is a group layer or None otherwise.

New in version 3.0.

classmethod new(image, name)
Parameters:
  • image (Gimp.Image) – The image to which to add the group layer.

  • name (str or None) – The group layer name.

Returns:

The newly created group layer.

Return type:

Gimp.GroupLayer

Create a new group layer.

This procedure creates a new group layer with a given name. If name is None, GIMP will choose a name using its default layer name algorithm.

The new group layer still needs to be added to the image, as this is not automatic. Add the new layer with the [method`Image`.insert_layer] method. Other attributes such as layer mask, modes and offsets should be set with explicit procedure calls.

Other procedures useful with group layers: [method`Image`.reorder_item], [method`Item`.get_parent], [method`Item`.get_children], [method`Item`.is_group].

New in version 2.8.

merge()
Returns:

The resulting layer.

Return type:

Gimp.Layer

Merge the passed group layer’s layers into one normal layer.

This procedure combines the layers of the passed group layer into a single normal layer, replacing the group. The group layer is expected to be attached to an image.

New in version 2.10.14.