Open simoncozens opened 1 month ago
so the outer dict with "co.uk.corvelsoftware.Dotter"
key that contains the {'forced': 1}
as its item is gone?
Exactly. I'll take a look as to why.
Actually it might just be a repr problem with the UserDataProxy, and something else is wrong in my code; the dictionary is correct in _userData
...
Urgh, OK, it is a repr problem, the dictionary is fine and there was an issue somewhere else in my code which this did not help me to debug...
OK, so the actual issue is userData
is not copied when a node is cloned:
In [5]: layer.shapes[0].nodes[15].userData
Out[5]: ({'forced': 1})
In [6]: layer.shapes[0].nodes[15].clone().userData
Out[6]: ()
test-userdata.zip contains a Glyphs file with a node like this:
Except when read with glyphsLib:
I get this: