I have been using various scripts to access anchors. Updating from 1219 to 1224 today something seems to be broken.
The most simple case is:
f = Glyphs.font
m = f.selectedFontMaster
ID = m.id
for g in range(len(f)):
if len(f.glyphs[g].layers[ID].anchors) > 0:
.... etcetera
Which stops with
Traceback (most recent call last):
File “List Anchors.py”, line 16, in
if len(f.glyphs[g].layers[ID].anchors) > 0:
AttributeError: ‘NoneType’ object has no attribute ‘layers’
As usual the traceback message is assuming e depth of knowledge I do not possess. If there is a bug in my script, I don’t think it would not have worked OK for several years. So I think some intentional or unintentional change in the app. I do not see anything about Python in the changelog, so it is probably unintentional?