It is currently 25 Nov 2020, 15:48

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Run Code on Visible Layers Script for GIMP

Share your Python Fu Scripts/plug-ins for GIMP here
Pat625
Tutorial Creator

Re: Run Code on Visible Layers Script for GIMP

Post#11 by Pat625 » 20 Nov 2020, 14:44


Tin,
If there is only one item or letter on each layer with the rest of the layer transparent, must a selection be made? Or use lock pixels? (I do not know what I am talking about, do I?)

I plan on starting with fonts to change the font color. :hammer_head:

tim
GL Blogger

Post#12 by tim » 20 Nov 2020, 18:08


@Pat625 ,
Okay so you want to select each layer's "Alpha to selection" that's doable in script. here it is

Code: Select all

pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,layer);pdb.gimp_context_set_foreground((128,128,128));pdb.gimp_edit_fill(layer,FOREGROUND_FILL);
aka Tin

         

tim
GL Blogger

Post#13 by tim » 20 Nov 2020, 18:14


Or this version doesn't create artifacts around the outlines

Code: Select all

pdb.gimp_selection_all(image);pdb.gimp_layer_set_lock_alpha(layer,TRUE);
pdb.gimp_context_set_foreground((128,128,128));pdb.gimp_edit_fill(layer,FOREGROUND_FILL);pdb.gimp_layer_set_lock_alpha(layer,FALSE);
aka Tin

         


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 24 guests