Hi, Cindy Huyser <chuyser@xxxxxx> writes: > I'm in the process of writing a little plug-in that will automate the > process of converting a selection to a mask. FYI, GIMP-1.3 finally has this feature builtin. > My goal is to add a layer > to the image containing the mask made from the selection. The outline of > my process is: > > 1) Save the selection to a channel > 2) Duplicate the original layer > 3) Add alpha to the original and duplicate layers > 4) Add a layer mask (transparent/black) to the duplicate layer > 5) Copy the selection mask saved as a channel > 6) Paste the copy buffer onto the duplicate layer > 7) Anchor the pasted layer > 8) Delete the selection mask channel > > I've been everything except for deleting the selection mask channel. So > far, I've tried: > > 1) calling gimp_channel_delete() on the channel ID, either preceded by > gimp_selection_clear() or by itself. The call returns TRUE. > 2) calling gimp_drawable_delete() on the channel's drawable, with and > without preceding it by a call to gimp_drawable_detach().