Skip to content

Instantly share code, notes, and snippets.

@t3rmin4t0r
Created October 14, 2013 03:56
Show Gist options
  • Save t3rmin4t0r/6970504 to your computer and use it in GitHub Desktop.
Save t3rmin4t0r/6970504 to your computer and use it in GitHub Desktop.
gimp star-trails layer stacker
import math
from gimpfu import *
import sys, os, math
def do_stack_propogate(image,drawable,apply_mask=False):
top = image.active_layer
found = False
n = len(image.layers)
i = 0
gimp.progress_init("Stacking layers")
for l in image.layers:
gimp.progress_update((100*i)/n)
if found and l.name != "Background":
l.mode = top.mode
l.opacity = top.opacity
if(apply_mask):
# l.mask is not assignable, fix it someday
if l == top:
found = True
register(
"python_fu_startrails",
"Merge a stack of images into star trails",
"Merge a stack of images into star trails (copies the current layer's mode+opacity into each layer below)",
"Gopal V",
"Gopal V",
"2013",
"<Image>/Filters/StarTrails", # None
"RGB*",
[
# (PF_BOOL, "apply_mask", "Apply Mask", True),
],
[],
do_stack_propogate)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment