12-11-2022, 04:55 PM
Just replace
with:
So now you bucket-fill with the alpha channel locked, so pixels keep their opacity. layer.fill() always fill the whole layer, it is intended to initialize the layer after creation, not for general painting.
Code:
layer.fill(FOREGROUND_FILL)
with:
Code:
layer.lock_alpha=True
pdb.gimp_edit_fill(layer,FILL_FOREGROUND)
So now you bucket-fill with the alpha channel locked, so pixels keep their opacity. layer.fill() always fill the whole layer, it is intended to initialize the layer after creation, not for general painting.