How can i connect output of a node group to a material output node in blender 2.8 using python script ?

links = tree.links link = links.new(group_node.outputs[1], ShaderNodeOutputMaterial.inputs[1])

I have Added this script for connecting my group to material output but this is not working blender throws an error which looks like this

Traceback (most recent call last): File "\Def functions.py", line 798, in <module> NameError: name 'ShaderNodeOutputMaterial' is not defined Error: Python script failed, check the message in the system console

Can any one help me with this


Your Answer

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

Browse other questions tagged or ask your own question.