My better half is trying to write a little script for me that will use a shortcut to toggle selectability on the objects in a scene in the 3D View - not just the Outliner. (we are aware of the [s] shortcut/ (bpy.ops.outliner.selectability_toggle()) thing that works within the Outliner, but its very fiddly for day-to-day use, and i’d prefer a Lock shortcut that works, like the Hide one, in the 3D View itself. Or, ideally, in any view!)
However he don’t seem to be able to do this because the outliner operators are only available when the mouse is over the outliner panel.
Is it possible to side-step this? He wants to know if there’s a way he can loop over the elements in the outliner panel in the same way that he can loop over the objects in the scene?
Any help 'ppreciated! :yes: