03-02-2024, 08:58 PM
You Pass a drawable (so, your layer, likely)
For most operations (manual or in scripts), the selection is implicit. The selection applies to the pixels of the current "drawable" that are also included in the selection mask. The only exception to this rule is that for paint/delete operations, if the selection is completely empty, it behaves as if everything was selected. So once you have created a selection, everything you do next is constrained to that selection , until your use pdb.gimp_selection_none(image) to clear the selection.