koeberlin
(Christoph)
March 4, 2024, 11:29am
1
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()
newLayer.name = '{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 layer.name
is not relevant.
koeberlin
(Christoph)
March 4, 2024, 11:45am
3
Thanks, Georg, that’s what I did beforehand:
{
a01 = 21;
a02 = 84;
}
jkutilek
(Jens Kutilek)
March 4, 2024, 11:57am
4
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
koeberlin
(Christoph)
March 4, 2024, 12:06pm
5
Vielen Dank once again, Jens!