*edit - fixed a silly error in code but ultimately same result.
I’ve written a little test function to duplicate an entire master prior to performing some actions on those newly created. While it appears to have duplicated them I can’t edit or select them in the layers panel individually. When I delete anyone one of them from the master info panel they all disappear. This tells me their ID is also duplicated and not newly assigned.
When I save and close the file, reopen it and try to delete a master it will allow this. But all the glyphs in newly duplicated masters are empty.
What could I do?
My script is processing an existing font and adding new variable font axes. Previously I was adding new master layers. My thought was duplicating the entire master reduces the chance of incompatibility, saves ot features etc.
Same result in 2.4, 2.5, 2.6
def DupeMaster(dupenum):
print "start dupe"
font = Glyphs.font
s = font.masters[0]
for d in range(dupenum):
print "dupe" + str(d)
font.masters.append(s)
DupeMaster(3)