Merge down layers non-destructively
Submitted by david gowers
Link to original bug (#355730)
Description
The existing 'merge down' operation destroys the original layer. In the cases where I'm incrementally applying paint or other effects using layers, this is awkward, as I have to continually recreate the layer, and parasites, positioning,.. are not preserved. For incremental application of any effect, non-destructive 'merge down' is much better. The idea is to apply the merge down effect, keep the layer intact and clear the layer to a neutral color (Or empty, if it has an alpha channel). I call this 'Reset merge'. This makes it easy to, for instance, add shading levels one by one. (pick a color, draw on the shade layer, reset merge, draw on the shade layer, reset merge, draw on the shade layer...)
In my observation, this operation is more commonly useful than Merge down. A PyGimp plugin which implements this command is attached. I hope that it proves itself generally useful enough to be implemented in a more efficient way in Gimp itself. In any case, I'm offering it for inclusion in GIMP in plugin form. I might also write a patch implementing it directly in GIMP.
This plugin also demonstrates how to use the lower-level 'gimpplugin' class, which is much faster than GimpFu for non-interactive plugins.
Version: git master