Creating brace layers with Python

I try to add brace layers, but even though I already set the attributes/coordinates and the layer name is becoming bold, it still isn’t a real special layer when clicking on it and trying to change it. What else do I need to set?

newLayer = GSLayer() = '{21,84}'
newLayer.associatedMasterId = Font.masters[1].id
newLayer.attributes['a01'] = 21
newLayer.attributes['a02'] = 84

To understand what you need to put into the .attributes, manually make a brace layer and print the attributes of that layer.

The is not relevant.

Thanks, Georg, that’s what I did beforehand:

    a01 = 21;
    a02 = 84;


I think you don’t need to assign your dict directly to newLayer.attributes, but to newLayer.attributes["coordinates"]:

newLayer.attributes["coordinates"] = {"a01": 21, "a02": 84}
1 Like

Vielen Dank once again, Jens! :heart_hands: