Re: [Gimp-user] Behaviour of "gimp-layer-create-mask" with channels

2010-01-10 Thread Sven Neumann
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().


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Behaviour of "gimp-layer-create-mask" with channels

2010-01-10 Thread Gino D
Hi.

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?
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user