Created
July 27, 2019 16:54
-
-
Save mekkablue/932792cc5fb29e05dccab52b807cede6 to your computer and use it in GitHub Desktop.
Open closed paths
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
#MenuTitle: Open closed paths | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Opens all paths in the visible layers of selected glyphs. | |
""" | |
Font = Glyphs.font | |
selectedLayers = Font.selectedLayers | |
def process( thisLayer ): | |
pathCount = 0 | |
for thisPath in thisLayer.paths: | |
if thisPath.closed: | |
thisPath.closed = False | |
pathCount += 1 | |
return pathCount | |
Font.disableUpdateInterface() | |
print "Opening paths in %i glyphs:" % len( selectedLayers ) | |
for thisLayer in selectedLayers: | |
print "-- %s: opened %i path(s)." % ( thisLayer.parent.name, process( thisLayer ) ) | |
Font.enableUpdateInterface() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment