Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
perl script
#6
I don't know perl, but in scheme or python, excatly as you would do it manually:

Code:
# Ensure the layer is alpha-locked (so we don't paint the transparent pixels)
pdb.gimp_layer_set_lock_alpha(layer, True)
# Set foreground to wanted color
pdb.gimp_context_set_foreground((0,0,255))
# Bucket-fill the selection (there should be no selection)
pdb.gimp_drawable_edit_fill(layer,FILL_FOREGROUND)

   

To get layer2, you can either use its position in the stack, or enumerate all the layers and compare the names.
Reply


Messages In This Thread
perl script - by aka - 09-16-2021, 09:39 AM
RE: perl script - by rich2005 - 09-16-2021, 10:41 AM
RE: perl script - by aka - 09-18-2021, 06:28 AM
RE: perl script - by Ofnuts - 09-19-2021, 08:39 PM
RE: perl script - by aka - 09-20-2021, 08:35 AM
RE: perl script - by Ofnuts - 09-20-2021, 03:58 PM

Forum Jump: