Deleting multiple layers at a time.
Hi everyone. I'm trying to find a way to remove multiple layers at a time. I wanted to write a script, but the Fontparts help doesn't tell me how to remove a layer.
The most basic functionality I want is to remove all layers except the foreground (top) layer. An advanced functionality could be to have a window where I can select which ones to delete.
Can anyone help me out?
font = CurrentFont() # use these to send to a vanilla List object print(font.layerOrder) for layer in font.layerOrder: # don't remove the default layer (or top layer) if font.defaultLayer.name != layer: font.removeLayer("background")
to build a simple UI see Introduction to vanilla.
and for more examples see everything with a ‘vanilla’ tag
Thanks so much Frederik!
That's exactly what I was missing!