-
-
Save weiweihuanghuang/5575d61938dfdd7f8e2a to your computer and use it in GitHub Desktop.
Find in Layer Names 2
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
import GlyphsApp | |
import vanilla | |
Doc = Glyphs.currentDocument | |
Font = Glyphs.font | |
numberOfMasters = len( Font.masters ) | |
text = u"" | |
searchFor = "[" | |
for g in Font.glyphs: | |
if len( g.layers ) > numberOfMasters: | |
for Layer in [ x for x in g.layers ][numberOfMasters:]: | |
if searchFor in Layer.name: | |
Attributes = {"GSLayerIdAttrib" : Layer.layerId()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment