Created
December 23, 2015 15:24
-
-
Save lm913/5106e1b2cee68349b84f to your computer and use it in GitHub Desktop.
Creates a New Group within a pre-processing script
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
function psNewGroup(groupName,vis,lock,showHide){ | |
//"HdAl" - Hides; "RvlA" - Reveal All; "RvlS" - Reveal Selection | |
var doc = activeDocument; | |
doc.layerSets.add().name = groupName; //variable must be string | |
if(!showHide) {showHide=null} else {psNewMask(showHide,null);} | |
if(vis==false) {doc.layerSets.getByName(groupName).visible = vis} else {lock=null;} | |
if(!lock) {lock=null} else {doc.layerSets.getByName(groupName).allLocked = lock;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment