Grasshopper Geometry Pipeline nested layer wish


#1

Hi David,
could you please add support for nested layers in the grasshopper geometry pipeline?

I am now forced to use layers starting with similar text and then use the wildcard " * " to get it to work, but it would be so much better if grasshopper would support Rhino’s native MainLayer::SubLayer naming, so if I used MainLayer* it would automatically select geometry from all sublayers.

Thnx!


(David Rutten) #3

I’ll have a dig around the code to see whether this can be added without disrupting too much. (probably)


#4

Supersmooth if possible.

Can you take a look at why rendered mode presents the delunay mesh so gray and dull?

Here with default preview material is white, no transparency:

And here baked:

As you can see environment lighting and sun is used.


(David Rutten) #5

Yeah it was pretty trivial. The full layer path string is now compared against the layer filter, so that assuming a file with three nested layers:

Default
Default::SubLayer1
Default::SubLayer1::SubLayer2

you can filter:

Default                  (the first layer only)
Default*                 (all layers)
Default::*               (sublayers only)
*SubLayer2               (third sublayer only)

the problem is that this changes the behaviour. Previously, SubLayer2 would have selected the third layer, and now it no longer does. Just automatically adding an asterisk in front of the layer filter if there isn’t one already also breaks past behaviour.

@Holo, any suggestions on how to resolve this?


#6

Hi David, sorry for the late reply!

I see… I think…

So we would need a logic way to handle both.

Could using :: be the trigger?

Scenario 1:
Def: SubLayer2
selects objects on all layers and sublayers named SubLayer2.

Scenario 2:
Def: *SubLayer2
selects objects on all layers and sublayers that ends on SubLayer2.

Scenario 3:
Def: *::SubLayer2
selects objects on all sublayers that ends on SubLayer2.

Or am I missing something?

I’ll play around with this some more!


(David Rutten) #7

Ok this is not ideal, but it at least doesn’t break old behaviour. I added some versioning to the pipeline so that when a pipeline from an old file is read, it behaves in the old way. You can switch to the new behaviour from the menu. Newly created pipelines always behave in the new way. The switch to new behaviour is undo-able.

Old behaviour, shows a warning:

Switching to new behaviour:

Layer filter will need to be adjusted by the user to make it work under the new behaviour:

Ideally I’d like to make it smarter than this, but that will have to wait until GH2.


#8

David,

I’d like to start using this, where do I need to look to download this GH
update?

Thanks,

Dan


(David Rutten) #9

I’ll probably commit this code before the next Tuesday Rhino WIP release. However last week’s release may already have the new behaviour, just not the legacy support.