1
$\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$
0
$\begingroup$

Answer:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.