Model layer component no longer outputs sublayers in WIP

The model layers component no longer outputs layers with a layer::sublayer structure in the latest WIP (8.0.23108.14305, 2023-04-18).

I have been building scripts for months using this method, but now it is broken for me.
This is on Windows 10.0.19045.

1 Like

Thanks → RH-74410 Grasshopper: Model Layer no longer shows full layer name

1 Like

Hi @Intuos,

I did this change to allow same kind of logic on any named type like Layers, Materials, Linetypes, etc.
With the current implementation you can use same logic for adding a prefix to your layers and materials for instance, while the previous implementation force you to parse Layer full path in order to do it and treat different types in a different way.

Right now you can do something like this to obtain the full path.

Could you please explain a little bit more in detail how are you using the Layer Full Name?

Hi @kike,

I am using the full layer name primarily to retrieve any of the parent layers that I have in a document.
The idea is that every design iteration is assigned a unique parent layer name (e.g. Design 01, Design 02, etc.) and within each Parent layer I use a consistent sub-layer structure (e.g. 0. Street centrelines, 01. buildings, etc.). get the geometry I need into grasshopper by referencing the sublayers and can change the design by changing the parent layer in this portion of the script:

That way, I can generate each design version independently (and bake intermediate steps when I am happy with the result).


What about something like this?

I added the ‘Cull empty fragments’ options on the latest release to do this.

From here you can switch using ‘Design Index’ slider and reference the geometry under this option.

Am I following you correctly?
Does ‘Content Identity’ work for you?

Yes, you are following me correctly. But, the “default” layer should also show (since it is a main layer in the document). At least, that’s what the old workflow allowed me to do. Not sure yet whether content identity works the way I want it to, because when I ran a test earlier with a file where there were layers with and without sublayers, the method you’ve shown in your earlier post didn’t work the way you showed. Anyways, I just checked to see if there was an update, but I don’t have access to the cull empty fragments yet.

Is it possible to get a component that filters out the main layers? I’m asking because that would simplify definitions (less work/ shorter/ don’t need user objects/ clusters). Or perhaps have it as additional field in the Model Layers component?

I will have to get back to this when I get access to the cull empty option.

@Kike did you see my previous post?

I’m now also noticing that the Query Model Layers outputs this error, which it didn’t use to do before.

I’ve noticed this error as well if I use the purge command in Rhino or use a python component that purges layers.

Once purged the Query Model Objects component will return the error you show and output null values in place of the purged layers

Thanks Kike for adding the parent field in content information:

1 Like