Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Fu process questions.
#2
See gimp-image-get-layer-by-name. You can also get list/vector of all the layers in the image and iterate it. The background layer is the mast in the list (first is the top layer).

In the API you don't really "switch" layers, because there is no implicit active layer as you have in the UI. instead every call that involves a layer takes the target layer ID as an argument (the "drawable", in your case).

You can very likely simplify your process because if your mask layers are black and white, after you have a selection on the black you can obtain a selection on the white by just inverting the selection.
Reply


Messages In This Thread
Script Fu process questions. - by DaltonCalford - 11-25-2022, 08:10 PM
RE: Script Fu process questions. - by Ofnuts - 11-25-2022, 09:34 PM

Forum Jump: