We have been working recently with files with a very large number of layers, and there are some small functionality improvements that would help a lot with managing that:
Filter menu: add option for Selected with Sublayers
(to eliminate the need to manually expand what is sometime multi-nested layer structure - this would allow to just select parent)
Filter menu: add option for Hide Selected Layers (and Hide Selected Layers with Sublayers)
It would be useful to create a new parent layer from selected layers. So basically New Parent Layer icon/menu item.
Hi Jarek - what is the workflow here? Some layers are selected, and you click the new icon - what happens to these layers? Is the idea that you could then select or create a layer as their new parent for these and they are moved under this layer?
Hi Pascal, you got it - I actually mainly thought about:
- once you have some layers selected, you click the new icon and get a New Parent Layer dialog to type a name; then, all selected layers land as children of the new layer.
- but from your question I guess the idea could be expanded so the Name dialog has a button to pick an existing layer as a parent. (Sometimes dragging bunch of layers to an existing parent layer in a file with lots of them gets cumbersome and scrolling can take forever/easy to make a mistake…)
I like the ‘polite error message’ part
Otherwise we would be seeing:
"You can't move this layer there!!! Are you crazy or what?!"
Following up on this one:
On files with a lot of nested layers structure, the “Selected” filter is quite useless, if the children are not included. It’s too much work to expand all in the structure in order to select them so they stay visible once “Seleted” filter is applied. We are not using filters much because of this limitation; otherwise it would be a great feature.
Is there access to Filtering layers possible via scripting (RhinoScript or Python) ? Looking for a workaround for now…
Hi Jarek - in the Tools (Thor’s hammer) menu there is ‘Expand all’, I don’t know if that simplifies anything in your process.
not really, I am looking for a quick toggle solution - with files of nested layers and 100’s of layers, expanding all of them just to do this creates a lot of extra clutter and clicking.
It probably can be scripted (select layers/parents first, script would expand/select all children, then manually filter selected, and script would restore the original “expand” states…) - but I am hoping for a simple UI fix/addition that would not need workarounds.
Hi Jarek - I see - here’s a thing that you might be able to jiggle to do what you need in py-
ids = rs.SelectedObjects()
if not ids:
layers = [rs.ObjectLayer(id) for id in ids]
layers = list(set(layers))
for layer in layers:
parent = rs.ParentLayer(layer)
while parent is not None:
parent = rs.ParentLayer(parent)
layers = [sc.doc.Layers.FindByFullPath(layer, -1) for layer in layers]
if __name__ =="__main__":
Thanks Pascal, I will look into that.
Do you know if there is a RhinoCommon access to the Filter layers methods ?
Hi Jarek - I do not know - but I’ll poke around and see if anything looks likely.
I am looking for a better way to use Filters in complex files with a lot of layers. Currently the Filters don’t cut it as they are missing some obvious functionalities like hiding selected WITH children, without the need to expand the layer tree in Layer panel.
For more flexibility in making it work, would it be doable to add access to Filter functionality via scripting? In V6 there are new methods added to selected/deselected layers from the Layer panel - could we have one that also sets/gets the “Hidden” (filtered-out) status of a layer ?