I am trying to write a script that will connect an image to the surface texture of a material but it seems that the ways I have found to do that are outdated. I keep getting this error:
raise ValueError("1-2 args execution context is supported")
ValueError: 1-2 args execution context is supported
#uses nodes
skin.use_nodes = True
nodes = skin.node_tree.nodes
nodes
image = nodes.new(type=“ShaderNodeTexImage”)
output = nodes.get(‘Material Output’)
#print(image.outputs[0])
bpy.ops.node.link_make(image.outputs[0], output.inputs[0])
principled_bsdf = nodes.get(“Principled BSDF”)
if principled_bsdf:
nodes.remove(principled_bsdf)
emphasized text