Hi,
I’m trying to update a G2 script to G3, but it keeps crashing or returning this error.
I basically trying to change the path of a glyph by another (as a part of a bigger script).
This is the error that I’m getting:
And this is the part of the code that is not working anymore:
tempLayer = instanceFont.glyphs[self.modelGlyphName].layers[0].copyDecomposedLayer()
l.clear()
#v.0 - What used to work in G2, it now returns error in G3
l.paths = tempLayer.paths
# v0.1 - I tried this based on the documentation, but it returns an error too
l.paths = copy.copy(tempLayer.paths)
# v0.2 - What seemed to be the correct solution in G3, but crashes the app
l.shapes.append(tempLayer.paths[0])
I checked if the layer l
and the tempLayer
were good, and they are.
I also tried to update only l.bezierPath
but it returns an error too.
Do you know what is the way to do this in G3?