RSS/Atom feed Twitter
Site is read-only, email is disabled

GIMP GAP question

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

GIMP GAP question Mirai Warren 27 Jun 11:15
  GIMP GAP question saulgoode@flashingtwelve.brickfilms.com 27 Jun 13:53
   GIMP GAP question Mirai Warren 27 Jun 16:41
    GIMP GAP question saulgoode@flashingtwelve.brickfilms.com 27 Jun 21:29
Mirai Warren
2009-06-27 11:15:39 UTC (over 15 years ago)

GIMP GAP question

How can I get the layer id of the current layer to use in a GAP layer operation? Is there already a way to get it in GAP code?

saulgoode@flashingtwelve.brickfilms.com
2009-06-27 13:53:46 UTC (over 15 years ago)

GIMP GAP question

Quoting Mirai Warren :

How can I get the layer id of the current layer to use in a GAP layer operation? Is there already a way to get it in GAP code?

Whenever specifying layers in GAP dialogs, the layers are described by their stack positions -- by default: 0=topmost, 1=second from top, etc (there is usually an option to reverse the numbering so that 0=background, 1=second from bottom, etc). These stack positions will be converted to appropriate layerIDs when PDB or libgimp functions are called.

If this is not sufficient for what you are attempting, perhaps you could elaborate on your goals.

Mirai Warren
2009-06-27 16:41:45 UTC (over 15 years ago)

GIMP GAP question

What I want to do is similar to the "Duplicate Continue" plugin, but instead of duplicating the entire frame, only the current layer would be duplicated and added to the layer stack of the following frame, and a new frame would not be created. What I tried was to switch out gap_lib_image_file_copy with gap_layer_copy_to_image but I don't know how to get the current layer as the source layer. I hope that's clear, and thank you for your response.

saulgoode@flashingtwelve.brickfilms.com
2009-06-27 21:29:19 UTC (over 15 years ago)

GIMP GAP question

Quoting Mirai Warren :

What I want to do is similar to the "Duplicate Continue" plugin, but instead of duplicating the entire frame, only the current layer would be duplicated and added to the layer stack of the following frame, and a new frame would not be created. What I tried was to switch out gap_lib_image_file_copy with gap_layer_copy_to_image but I don't know how to get the current layer as the source layer.

The short answer:

source_layer_id = gimp_image_get_active_layer(source_image_id)

You should be aware, however, of how GAP determines the "active layer" for each frame; it varies depending upon the settings of the "AL-Tracking" mode specified in the VCR Navigator (this mode being one of "by layername", "by layerstack position", or "off").

I would also point out that the task you are attempting can be accomplished using GAP's Onionskin capabilities. The configuration options for onionskinning are described in the following document:

http://git.gnome.org/cgit/gimp-gap/tree/docs/reference/txt/plug-in-gap-onionskin-configuration.txt