For example, the source glyph is “_part.A”, with 3 smart axes Width, Height and Uroko.
And the copied one named “_part.B”, where I removed the Uroko axe.
I wrote a python script to set layer.smartComponentPoleMapping automatically.
However, an error occurred here:
File "GlyphsApp/GlyphsApp/__init__.py", line 2037, in __setitem__
File "_convenience.py", line 226, in __setitem__setObject_forKey_
self.setObject_forKey_(container_wrap(value), container_wrap(key))
objc.error: NSInternalInconsistencyException - -[__NSCFDictionary setObject:forKey:]:
mutating method sent to immutable object
I tried to print out layer.smartComponentPoleMapping values, they still be shown as old values (with no id).
If I edit any component pole value in GUI, the problem will be fixed (in edited layer). Error still occurred in other layers.
p.s. Indeed, I removed Height axe and created a new one. And it’s name cannot be shown here. It look like that the ID/name dictionary is still the old one here.
Can I reload the layer.smartComponentPoleMapping axes data via scripting?