Created
December 15, 2016 15:12
-
-
Save valioDOTch/b051463a4a78a70d56293118f7136983 to your computer and use it in GitHub Desktop.
Gimp loading bar script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
images = gimp.image_list() | |
layers = images[0].layers | |
width = gimp.pdb.gimp_image_width(images[0]) | |
height= gimp.pdb.gimp_image_height(images[0]) | |
opacity = 100 | |
parent_layer = None | |
above_active_layer = -1 | |
for x in range(0,width): | |
gimp.pdb.gimp_image_select_rectangle(images[0],CHANNEL_OP_REPLACE,x,0,1,height) | |
gimp.pdb.gimp_edit_cut(layers[0]) | |
newlayer = gimp.pdb.gimp_layer_new(images[0],1,height,RGBA_IMAGE,"x"+str(x),opacity,NORMAL_MODE) | |
gimp.pdb.gimp_image_insert_layer(images[0],newlayer,parent_layer,above_active_layer) | |
gimp.pdb.gimp_edit_paste(newlayer,FALSE) | |
floating=gimp.pdb.gimp_image_get_floating_sel(images[0]) | |
gimp.pdb.gimp_floating_sel_anchor(floating) | |
gimp.pdb.gimp_layer_set_offsets(newlayer,x,0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Python-Fu Gimp script that creates a loading bar
How to use: