Trim whitespace

This commit is contained in:
GreenDimond 2019-07-01 12:10:59 -07:00
parent c816a964b7
commit a507e93f73

View File

@ -21,7 +21,7 @@ for mat in bpy.data.materials:
tex = nodes["Image Texture"]
tex.interpolation = "Closest"
tex.location = 0, 0
# Create texture coordinate node
coord = nodes.new("ShaderNodeTexCoord")
coord.location = -600, 0
@ -29,11 +29,11 @@ for mat in bpy.data.materials:
# Create mapping node
map = nodes.new("ShaderNodeMapping")
map.location = -400, 0
# Create diffuse shader
diff = nodes.new("ShaderNodeBsdfDiffuse")
diff.location = 200, 0
# Create transparent shader
trans = nodes.new("ShaderNodeBsdfTransparent")
trans.location = 200, -150
@ -45,21 +45,21 @@ for mat in bpy.data.materials:
# Create output
out = nodes.new("ShaderNodeOutputMaterial")
out.location = 600, 0
# Link everything
links.new(coord.outputs[2], map.inputs[0]) # Coord > Map
links.new(map.outputs[0], tex.inputs[0]) # Map > Texture
links.new(tex.outputs[0], diff.inputs[0]) # Texture > Diffuse
links.new(diff.outputs[0], mix.inputs[2]) # Diffuse > Mix
links.new(trans.outputs[0], mix.inputs[1]) # Transparent > Mix
links.new(tex.outputs[1], mix.inputs[0]) # Texture alpha > Mix factor
links.new(mix.outputs[0], out.inputs[0]) # Mix > Output
# Deselect all
for node in nodes:
node.select = False
except:
continue