Created
September 22, 2022 20:53
-
-
Save mutterer/0c2a8692a3bedf7775fa79e28ce93598 to your computer and use it in GitHub Desktop.
Example curtain tool macro; uses partial image overlay.
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
macro "Curtain Tool - C00cT0f20A" { | |
getCursorLoc(x, y, z, flags); | |
setBatchMode(true); | |
id=getImageID; | |
run("Duplicate...","title=temp"); | |
// here goes the image transform to preview | |
run("Gaussian Blur...","sigma=5"); | |
// | |
id2=getImageID; | |
px=x; | |
while (flags&16>0) { | |
selectImage(id); | |
getCursorLoc(x, y, z, flags); | |
if (x!=px) { | |
selectImage(id2); | |
makeRectangle(x,0,getWidth-x,getHeight); | |
run("Duplicate...","title=part"); | |
id3=getImageID; | |
selectImage(id); | |
run("Add Image...", "image=[part] x="+x+" y=0 opacity=100 zero"); | |
while (Overlay.size>1) Overlay.removeSelection(0); | |
selectImage(id3); | |
close(); | |
px=x; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment