Bug: locking multiple components at once

This is in Glyphs 2.

I am trying to lock multiple components at the same time. Having selected them all, I find “Lock components” is only a contextual menu option if I right click directly on a component, and if selected only affects that one component. I think we should be able to “batch lock” components through the contextual menu.

(Along similar lines, I’m very gratified that I can “batch change source” by selecting multiple components and clicking on the component name in the info box. Locking should work that way too.)

I’m a few months late to this but was looking for a solution myself so I wrote a couple of scripts. I figured I’d share them here for future Googlers of this issue

I should probably combine it into one “toggle lock” script, but that’s for another day

We are working on improving the context menu with multiple selections. Until that is done, those script can help.