Hello all,
The problem: I spend ages isolating a complex selection, I delete the selection on one layer, move to the next layer to try to delete the same selection - but the selection is gone!
(This doesn't happen with 'fill selection' - only with delete. It caused me problems because I was trying to shape a cloud made up from many layers all interacting via different blending modes. Thought I'd try just changing the top layer and then use 'Alpha mask' on the other layers but Alpha mask didn't work for some reason - maybe due to the layer blend modes or because the transparency of the different layers were not fully opaque?)
The soloution: My simplest plugin yet! - select something, click 'selection2clear' (under Effects/selection), problem solved, selection clear but still active so I can now change layers and repeat the action.
No UI screen shot as no UI !
I'm probably the only person that will use this but if you encounter the same problem here's the .dll
selection2clear.zip 3.67K
394 downloadsAnd here's the code for in-depth study!
/* =================================================== */
/* selection to clear*/
/* © 2012 Red Ochre */
/* */
/* Description: make selection transparent, plugins maintain the selection, delete doesnt */
/* */
/* ========================================== ======== */
// Name: selection2clear
// Author: Red ochre (John Robbins)
// Submenu: Transparency
// URL: http://www.getpaint.net/redirect/plugins.html
// Title: selection2clear June 2012 Red Ochre
void Render(Surface dst, Surface src, Rectangle rect)
{
for (int y = rect.Top; y < rect.Bottom; y++)
{
for (int x = rect.Left; x < rect.Right; x++)
{
ColorBgra CurrentPixel = src[x,y];
CurrentPixel.A = 0; // now preserves BGR values as suggested by BoltBait
dst[x,y] = CurrentPixel;
}
}
}






















