Toggle on/off all visible layers except for selected layer....how?


#1

Hi,
V4
I am working over a raster plan image and at times wish to just view the plan as my workings are getting in the way !
I wish to temporarily in a quick toggle on/off sort of way, turn off visibilty for the other layers THAT ARE CURRENTLY ON, I dont want to find when I turn them back on that all layers turn on. I just want to toggle on/off all visible layers except for a selected layer, that selected layer being my plan image.

How is that done ?

I presume I would have to click on the raster image layer to let Rhino know what I wanted to remain on !
If the procedure is different then I shall go with that, but selecting the layer I still want on seems sensible and easy !

Steve


#2

Well, if you only want to “look at” one layer, as layer state changes get recorded by the undo stack, you can use OneLayerOn and then Undo when you’re done looking to get back to where you were.

Otherwise, you can use the LayerStateManager - which can be set up as a docked panel in V5 - to set up and save one or more layer states which you can then freely switch between. Unfortunately, if you add layers to the document after that, the layer state manager will not know about them.

To get around this you could:

First, set up a layer state where the one desired layer is on and nothing else. In the layer state manager, give it a name like “SeePlan”. Then, create a button in your Rhino workspace and on the left mouse side, macro something like:

-_LayerStateManager _Save "MostRecent" _Restore "SeePlan" _Enter

That will save your current layer state (no matter what it is) and then turn off all the layers except the one you left on when you created "“SeePlan”

On the right mouse of the same button, you can then put:

-_LayerStateManager _Restore "MostRecent" _Enter

-which will bring you back to where you were. The above will work even without the layer state manager being visible or docked as a panel.

Lastly, a perhaps simpler non-layer changing workaround for your particular need:

Make a copy of the picture frame image that you are using for your plan and put it on a another layer called, say “SeePlan”. Then move the copy in Z world above all other objects in the file. Lock the layer “SeePlan” for good measure. When you turn on that layer, your plan will appear above everything else; thus it’s all you will see. When you turn it off again, you will see everything else.

HTH,
–Mitch


(Willem Derks) #3

Hi Steve,

See if this post is helpful:

Down at the bottom Pascal is referring to his scripts page and the script to Isolate temporarily objects.
It will allow you to select the plan and isolate it for inspection, than un-isolate it again to go back to what you were doing.

NOTE:
I cannot seem to load any of the Rhino sites right now so, you as well might have to wait for it to come back online again.

EDIT:
Rhino site is back online. I can post the description of the script:

Isolate objects. Isolate objects for editing then restore the starting view and object visibility. Adds the following alias- Isolate, UnIsolate. IsolateLock, UnisolateLock, IsolateLayer, UnisolateLayer Updated 5/6/2011 added an option to save and reastore the current view or not- previous versions always saved and restored the view. Added Isolatelayer and UnisolateLayer

-Willem