Im trying to figure out how to link two nodes in Python. So far Ive found some pretty limited documentation here, but it gives you no idea what arguments the operator takes or how to use it.
So for example lets suppose that I wish to create a diffuse node, a glossy node, and connect them to a mix node which is connected to the material output.
bpyops.material.new()
bpy.ops.node.add_node(type="ShaderNodeBsdfGlossy", use_transform=True)
bpy.ops.node.add_node(type="ShaderNodeBsdfDiffuse", use_transform=True)
bpy.ops.node.add_node(type="ShaderNodeMixShader", use_transform=True)
How do you connect these nodes? And am I doing this right?
links.new(), see http://blender.stackexchange.com/q/5413/599 – gandalf3 Jan 22 '15 at 18:33