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
var doc = context.document | |
var selectLayersOfType_inContainer = function(layerType, containerLayer) { | |
// Filter layers using NSPredicate | |
var scope = (typeof containerLayer !== 'undefined') ? [containerLayer children] : [[doc currentPage] children], | |
predicate = NSPredicate.predicateWithFormat("(className == %@)", layerType), | |
layers = [scope filteredArrayUsingPredicate:predicate]; | |
// Deselect current selection |