Temporarily override locked layers

Is there any way to temporarily bypass locked layers? Much like we have a “disable” button to quickly bypass selection filters, it would be helpful to have something similar with layers.

The reason I ask is I work with very large projects (entire vehicles) where the components are organized into many categories of layer and sublayer. Sometimes I need to quickly grab something that is locked and it takes some time to find where that lock is.

Here is a random example from a current project. Say I needed to copy one of these lower rudder bushings that happens to be 5 layers deep. I don’t want to unlock everything everywhere and I made this part a year ago or it was made by someone else and I don’t recall where it is.

I can clearly see the thing I want on the model so rather than spend time searching for it in the layer structure is there any way I could just temporarily override that lock?

Hello- There is nothing like that currently that I know of - I do see the utility of such a feature - you can somewhat fake it using layer states for now, but I’ll add this to the pile and come up was a more useful temporary tool if I can.

For now setting up an unlocked layer state you can use

  1. _-LayerStateManager _Save “Temp” _Enter (to keep the current state)

  2. Unlock all layers, then _-LayerStateManager _Save “Unlocked”

Then use this macro to temporarily unlock but keep the previous state

_-LayerStateManager _Save "Temp" _Restore "Unlocked" _Enter

and this one

_-LayerStateManager _Restore "Temp" _Enter

to get back to the locked state.

That may help if no new layers are being created that will mess up the Unlocked state from time to time. Let me see if I can do better.

@Jason_Kuehn - what would the ideal behavior here? Is the goal to quickly identify a layer so that you can manually unlock it if you want, or to automatically just unlock the layers of the objects you choose, or to unlock all layers and work away until you say to put them back how they were, or?

I am guessing the second thing…
RH-79711 Layer: Temporarily unlock all

@Jason_Kuehn see if this does anything you like-

UnlockLayersByObject.py (1.7 KB)

To use the Python script use RunPythonScript, or a macro for a button or alias:

_-RunPythonScript "Full path to py file inside double-quotes"


1 Like

Yes, it would be good to have something like UnlockSelectedObjectLayer that would work somewhat like UnlockSelected - it would show all the objects on currently locked but visible layers (and hide all the rest) and let you choose some objects, then unlock the layer(s) of the objects selected.

1 Like

Pascal, you are a hero to all!

Your python script is awesome. I made a shortcut button combining your two suggestions and it works brilliantly.

Left click: _-LayerStateManager _Save “temp” _Enter _-RunPythonScript “C:\Rhino 7\Plugins and setups\Pascal\UnlockLayersByObject.py”
Right click _-LayerStateManager _Restore “temp” _Enter

That allows me to instantly unlock anything I can see, then restore the previous layer state when I’m done all without having to track down the actual layer involved. And it avoids having to keep the “unlocked” layer state updated over time.

I have your handy scripts page bookmarked and this needs to be added to it! I think anyone working in large projects would find this to be really useful. Thanks again!