After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310207 - Create/Add layer mask from arbitrary channel
Create/Add layer mask from arbitrary channel
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.2.x
Other Linux
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-07-13 10:56 UTC by quazgar
Modified: 2008-01-15 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description quazgar 2005-07-13 10:56:47 UTC
Distribution/Version: Gentoo

In the "Add Layer Mask" dialog:
How about adding the possibility to choose an arbitrary channel? This might
simplify many tasks and provide an easy way to interchange layer masks without
the workaround via selections.

Maybe an additional feature:
Do this by drag&drop.
Comment 1 Sven Neumann 2005-07-13 14:38:17 UTC
How would that look like? Provide a channel selection in the Add Layer Mask dialog?
Comment 2 quazgar 2005-07-13 19:02:34 UTC
For example, or in an additional menu afterwards. Aren't dropdown menus for
source selection included already somewhere? At least they appear in some filter
plugins. Maybe a simple option like "Select from source..." and a complete menu
(in the next Dialog) with sources like channels, layers, files, ... would be
appropriate.

But IMHO that's rather an implementation issue that should be discussed with
people who have more experience than I have :-)
Comment 3 Michael Natterer 2006-05-14 16:25:15 UTC
Fixed in CVS:

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.