Last active
December 23, 2015 15:38
-
-
Save lm913/bae57650e4da52a61c58 to your computer and use it in GitHub Desktop.
Pre-process script for 32020
This file contains hidden or 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
/** | |
* ---Required ps functions--- | |
* psNewGroup | |
* psNewPath | |
* psNewLayer | |
* psNewMask | |
* psAdjColourFill | |
* psApplyImgMask | |
* psDuplicate | |
*/ | |
//currently requires a Background Layer | |
var doc = activeDocument; | |
//create the path items | |
psNewPath("Path 1"); | |
psNewPath("Path 2"); | |
//create the initial layer order | |
psNewLayer ("Original",false,true,null); | |
psDuplicate ("Original","masked",true,false,"RvlA") | |
psAdjColourFill ("background",255,255,255); | |
psNewLayer ("reflection",null,null,"RvlA"); | |
psAdjColourFill ("shadow",0,0,0); | |
psApplyImgMask ("Original","shadow"); | |
psNewLayer ("retouch",null,null,"RvlA"); | |
psNewGroup ("shadow / reflection",null,null,"HdAl"); | |
//adjust the layer order | |
doc.layers.getByName("masked").move(doc.layers.getByName("retouch"), ElementPlacement.PLACEAFTER); | |
doc.layers.getByName("background").move(doc.layers.getByName("Original"), ElementPlacement.PLACEAFTER); | |
//adjust the group order | |
doc.layers.getByName("reflection").move(doc.layerSets.getByName("shadow / reflection"), ElementPlacement.INSIDE); | |
doc.layers.getByName("shadow").move(doc.layerSets.getByName("shadow / reflection"), ElementPlacement.INSIDE); | |
doc.layerSets.getByName("shadow / reflection").move(doc.layers.getByName("masked"), ElementPlacement.PLACEAFTER); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment