WISH: Hiding Layers

Although not so obvious, but this could allow new workflows

i am curious what you actually really mean by this obviously already existing feature. the objects from the layer in the viewport, or the layer in the layer manager itself? OR you want to activate one object which belongs to layer and hide the entire layer? i am currently trying to optimise my workflow either. many of such things can be macro_ed shortcutted…

the layers themselves

If you are developing something and you have a bunch of objects that you want to refer to. You can put them in a layer that’s hidden, not only the objects but the layer to not be visible for easy navigation in the layer panel.

Example. Check out SectionTools. When you create a section a new layer is created. This layer is not relevant when you design, you require it only when you create a drawing from that section. If you have 100+ of these that Layer Panel is becoming messy.

Kind of like hiding rows or columns in Excel - except in the layers tab of Rhino?
What sort of method would be used to unhide them?

I don’t know how the api is right now but perhaps the Layer class could have a new boolean attribute HIDDEN and if it is TRUE it should not be visible in that panel. Or the other way around a boolean SHOW that if FALSE it will not be visible.

perhaps the layer context menu there could be a command (Show Hidden Layers) and (Hide Hidden Layers) so that you have an option to show and hide the layers marked as hidden. Along with a command to actually show and hide the selected layer(s)

another implementation could be that all hidden layers are put in an additional tab in the panel, but that seems to me as a lot more work programatically.

UPDATE: If you think for the future, if in say Rhino8 they move to a Database-based application. Then These layers could also have a lock mechanism that only some ‘super’ users are able to view and modify these hidden layers.

You can ‘filter’ layers currently, with the funnel icon, altought it is poorly implemented and counter-intuitive, especially when working with nested layers. And there is no scripting access to it…

An enhancement has been requested a while ago:
https://mcneel.myjetbrains.com/youtrack/issue/RH-37102

1 Like

Created 2 years ago and no one is working on it :slight_smile:

You can add your voice, the more users interestet the higher chance of attention : )

I would, but my wish isn’t exactly connected to filtering. Advanced Filters will not be good enough to meet with my wish :stuck_out_tongue_winking_eye:

From what you described, filter in Layer panel could do exactly that. Its UI is not that convenient though. But enabling scriptability of the filtering could make what you described easy to do, and customized.

1 Like

Not because that would mean you’d need that filtering to be always on. Where are you going to store that setting?

  • In the file? That would confuse other people who open the file.
  • In Win/Mac user settings? That could also be confusing if someone opens the file on another machine.

This is why what I wish is change of the class Layer so that it has (at least) one more property (attribute,method). Filtering functionality is simply not enough. Scripting or no scripting.

One easy way to achieve something similar would be to use block definitions instead of layers, as this is way less visible to the user. Userdata and documentuserdata are two other ways to have truly invisible data but I don’t think it’s feaseable to implement them in python.
But I second your wish as storing objects on invisible layers could be nice sometimes.

+1 on this WISH, ability to hide layers from the layer Panel, (invisible layers).
Useful for developing plugins that requires ‘baked’ utility objects that should only be controlled programmatically.

Something like the current conventions:
prefix with a dot (.) similar to User Text Attributes
or
prefix with a asterisk (*) similar to Block Definitions and existing UI /functionality.
This convention should apply to name or name of parent (aka Full Path)

Hi Tony -

The feature request is on the list as RH-78657 Layer: Hide layer in Layers panel

Note that plug-ins such as VisualARQ already create layers that are hidden from the UI, so, for a developer, this is already possible.
-wim

1 Like

I have only ever used Python for scripting in Rhino, and would appreciate if you could give me some guidance on how you can create layers that are hidden from the UI (programmatically). I guess this functionality is exposed in the RhinoCommon API somewhere. Do you happen to know where exactly?

Are you planning to implement named ‘sets’ of visible layers, based on this? Inspired by Autocad.
There are already some filtering rules available of course, but this one would mean storing/restoring a manual selection. Should be quite within reach.
Thanks!

Hei Håvard -

If Dale’s comment about CRhinoLayer::IsVisibleInRhinoUserInterface in RH-78657 doesn’t help you further, please start a new thread in the Scripting category so that your question gets seen by those who know.
-wim

Hi @wim,

I don’t think this is exposed to .net
https://developer.rhino3d.com/api/rhinocommon/rhino.docobjects.layer

I can’t see any method or property here that reflects the one you mentioned.