GSlayer.isSpecialLayer read only?


I’m working on converting a script to Glyphs 3. One of the actions it performs is creating new bracket layers. It seems that since G3 they are recognised by the isSpecialLayer attribute. That attribute appears to be read-only. Is there a particular reason for it? Is it possible to create a bracket layer via script in G3?

Thank you,

isSpecialLayer must be read-only because it could be an intermediate (brace) layer. Will get back to you about setting up via script.

The brace layers are set in layer.attributes: Python Scripting API Documentation — Python Scripting API 3.0 documentation

Thank you both! @GeorgSeifert I was able to set isSpecialLayer to True via layer.attributes. However the layer still is not recognised by Glyphs as bracket (alternate) layer. I think the name syntax [600<wg] is right. Perhaps there is a dedicated method for that, an equivalent of right clicking the layer and setting type to Alternate?

This is not the correct syntax. the easiest is to manually set a bracket layer and then print the attributes to see what structure it needs. And the sample code on the docu page should help.

Thank you! I overlooked the sample at the top of attributes section. I am now able to create working bracket layers.