Created
August 28, 2016 20:43
-
-
Save marianomike/8352e90848cf84b7a8e30a6350306cb9 to your computer and use it in GitHub Desktop.
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
var onRun = function(context) { | |
var doc = context.document; | |
var selection = context.selection; | |
if(selection.count() == 0){ | |
doc.showMessage("Please select something."); | |
}else{ | |
for(var i = 0; i < selection.count(); i++){ | |
var layer = selection[i]; | |
var layerIsLocked = layer.isLocked(); | |
if(layerIsLocked == true){ | |
layer.setIsLocked(false); | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment