I’m making a script that I want to attach or detach links between a texture node’s output and a shader node. I have it working to make links between them using material.node_tree.links.new(shader.inputs, diffuse_tex.outputs). But I cannot figure out how to detach them or otherwise cut the link. Is there some other material.node_tree.links thing I can use?
link = node_tree.nodes['Material Output'].inputs['Surface'].links node_tree.links.remove(link)