On Sun, 2010-01-10 at 11:51 +0100, Gino D wrote:

> I need some clarification on how the Script-Fu procedure
> "gimp-layer-create-mask" acts with channels.
> Supposing that the current image holds more than one channel, whether
> I wanted to call such procedure with its second argument "mask-type"
> set to "ADD-CHANNEL-MASK" (6) , how would the Script-Fu interpreter
> understand which channel to consider? Or rather, with what additional
> command should I specify the chosen channel? 

If in doubt, read the source code:

layer_cmds.c (layer_create_mask_invoker):

  if (mask_type == GIMP_ADD_CHANNEL_MASK)
      channel = gimp_image_get_active_channel (image);

The procedure will use the active channel. You can set the active
channel using gimp-image-set-active-channel().


Gimp-user mailing list

Reply via email to