Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import bpy
  2. import os
  3.  
  4. mat = bpy.data.materials["Material"]
  5.  
  6. nodes = mat.node_tree.nodes
  7. material_output = nodes.get ("Material Output")
  8.  
  9. node_texture = nodes.new(type='ShaderNodeTexImage')
  10. node_texture.image = bpy.data.images.load ('C:\Users\KM\Desktop\Blender\auto.png')
  11. node_texture.projection = "LINEAR"
  12.  
  13.  
  14. links = mat.node_tree.links
  15. link = links.new(node_texture.otputs[0], nodes.get("DIffuse BSDF"),inputs[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement