The following script does not work right in G3, but it works right in G2.
I found the function append does not work sometimes, that’s why the xPaths is empty.
but , I don’t know where is wrong?
import copy
from Foundation import NSMakeRect, NSIntersectsRect
xPaths = []
pLayer = Glyphs.font.glyphs["space"].layers[0]
checkRect = NSMakeRect(0, 350, 300, 300)
for p in aLayer.paths:
if NSIntersectsRect(checkRect, p.bounds):
xPaths.append(p.copy())
print(xPaths)