Got a basic question.
Trying to modify a mekkablue script Lines by Master
but instead of looping through all the masters in the font I want it to loop of a list that I made manually.
Excerpt of orginal code
theseLayers = []
for m in Font.masters:
for gname in names:
layer = Font.glyphs[gname].layers[m.id]
# print(layer)
theseLayers.append( layer )
theseLayers.append( GSControlLayer.newline() )
What I don’t quite get is what format to list masters in within theseMasters = []
so then the .id can be accessed. I tried making a comma separated listed in this format <GSFontMaster "Bold" (500.0,1000.0,0.0,0.0,100.0,0.0,0.0)>
but that doesn’t work.
theseMasters = [
<GSFontMaster "Bold" (500.0,1000.0,0.0,0.0,100.0,0.0,0.0)>,
<GSFontMaster "Light" (500.0,1.0,0.0,0.0,100.0,0.0,0.0)>,
etc..
]
theseLayers = []
for m in theseMasters:
for gname in names:
layer = Font.glyphs[gname].layers[m.id]
# print(layer)
theseLayers.append( layer )
theseLayers.append( GSControlLayer.newline() )