GeoNodes and View layer

Does anyone know a trick to influence a geometry node based on the current viewLayer?
As far as I know, viewLayer only save the state of collections and render outputs. I haven’t found any attribute or custom property.

You can use a driver on a Geometry Node setting.
You set that driver to be driven by a variable that is a context property.
You set the context to Active ViewLayer instead of Active Scene by default.
Then, you set path to custom property.
You create a custom property per ViewLayer, using same name, in ViewLayer tab.
You may have a refreshing issue, when creating custom properties.
Just press Update Dependencies button of driver. Then, that should work.

Hey, thanks that works great !!!

PS: took me a while to figure out how to get the context changed from object… simple press on the X sign above.

Anyway, that’s really super powerful.