Created
September 12, 2019 03:14
-
-
Save abynim/70b2af5dd140c75ee7614a41b44b5b7e to your computer and use it in GitHub Desktop.
Select filtered layers in Sketch
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
// run this code in Sketch's script window (Plugins > Run Script...) | |
// tested in Sketch 57 | |
context.document.currentPage().changeSelectionBySelectingLayers(nil); | |
let children = context.document.currentPage().children().objectEnumerator(), layer; | |
while(layer = children.nextObject()) { | |
layer.select_byExtendingSelection(context.document.sidebarController().filterViewController().filter().shouldIncludeNode(layer), true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment