2
$\begingroup$

I am trying to assign a value to the 'Fac' input of a Mix Shader. I have tried this, but it fails (value: invalid, expected a StructRNA type or None, not a float):

mat = mat.node_tree.nodes.get('Mix Shader')
mat.inputs[0] = 0.8

What is the correct syntax?

$\endgroup$

1 Answer 1

1
$\begingroup$

Answer:

mat = mat.node_tree.nodes.get('Mix Shader')
mat.inputs[0].default_value = 0.8
$\endgroup$

You must log in to answer this question.

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