0
$\begingroup$

I need to update shader settings for the environment according to the active view layer. I would like to just have a Value node that checks if the active view layer is a specific view layer. Something like,

bpy.context.view_layer == "specific layer"
bpy.context.window.view_layer == "specific layer"
bpy.context.view_layer.name == "specific layer"

(etc.) But every variation of this I have tried fails to process. Can what I am trying to do be done? How?

$\endgroup$

1 Answer 1

0
$\begingroup$

Add a new driver to the value node and set this as the expression: depsgraph.view_layer.name == "YourViewLayerName"

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .