実際のところ
import bpy mat = bpy.data.materials.new(name="foobar") mat.use_nodes = True bsdf = mat.node_tree.nodes["Principled BSDF"] texImage = mat.node_tree.nodes.new('ShaderNodeTexImage') texImage.image = bpy.data.images.load("C:\\Users\\user\\Pictures\\green.jpg") mat.node_tree.links.new(bsdf.inputs['Base Color'], texImage.outputs['Color']) # 初期キューブに割り付ける bpy.data.meshes['Cube'].materials.append(mat)