mirror of https://github.com/GNOME/gimp.git
Allow to initialize a new layer mask with any of the image's channels.
2006-05-14 Michael Natterer <mitch@gimp.org> Allow to initialize a new layer mask with any of the image's channels. Fixes bug #310207. * libgimpbase/gimpbaseenums.h (enum GimpAddMaskType): added value GIMP_ADD_CHANNEL_MASK. * libgimpbase/gimpbaseenums.c * tools/pdbgen/enums.pl: regenerated. * app/core/gimplayer.[ch] (gimp_layer_create_mask): added GimpChannel* parameter. Hacked the GIMP_ADD_SELECTION_MASK code a bit so it can handle GIMP_ADD_CHANNEL_MASK too. Cleaned up the function a bit. * app/dialogs/layer-add-mask-dialog.[ch]: added a menu of the image's channels. * app/actions/layers-commands.c (layers_add_mask_response): pass the channel selected in the menu to gimp_layer_create_mask(). * tools/pdbgen/pdb/layer.pdb (layer_create_mask): use the image's active channel when GIMP_ADD_CHANNEL_MASK is passed. Fail if there is no active channel. * app/pdb/layer_cmds.c: regenerated.
This commit is contained in:
parent
1217dc8d07
commit
ab274e595d
|
@ -25,13 +25,15 @@ package Gimp::CodeGen::enums;
|
|||
header => 'libgimpbase/gimpbaseenums.h',
|
||||
symbols => [ qw(GIMP_ADD_WHITE_MASK GIMP_ADD_BLACK_MASK
|
||||
GIMP_ADD_ALPHA_MASK GIMP_ADD_ALPHA_TRANSFER_MASK
|
||||
GIMP_ADD_SELECTION_MASK GIMP_ADD_COPY_MASK) ],
|
||||
GIMP_ADD_SELECTION_MASK GIMP_ADD_COPY_MASK
|
||||
GIMP_ADD_CHANNEL_MASK) ],
|
||||
mapping => { GIMP_ADD_WHITE_MASK => '0',
|
||||
GIMP_ADD_BLACK_MASK => '1',
|
||||
GIMP_ADD_ALPHA_MASK => '2',
|
||||
GIMP_ADD_ALPHA_TRANSFER_MASK => '3',
|
||||
GIMP_ADD_SELECTION_MASK => '4',
|
||||
GIMP_ADD_COPY_MASK => '5' }
|
||||
GIMP_ADD_COPY_MASK => '5',
|
||||
GIMP_ADD_CHANNEL_MASK => '6' }
|
||||
},
|
||||
GimpBlendMode =>
|
||||
{ contig => 1,
|
||||
|
|
Loading…
Reference in New Issue