Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- import os
- mat = bpy.data.materials["Material"]
- nodes = mat.node_tree.nodes
- material_output = nodes.get ("Material Output")
- node_texture = nodes.new(type='ShaderNodeTexImage')
- node_texture.image = bpy.data.images.load ('C:\Users\KM\Desktop\Blender\auto.png')
- node_texture.projection = "LINEAR"
- links = mat.node_tree.links
- link = links.new(node_texture.otputs[0], nodes.get("DIffuse BSDF"),inputs[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement