Fetching contributors…
Cannot retrieve contributors at this time
77 lines (62 sloc) 3.96 KB
# Mineways Blender script, for quickly setting materials for Mineways models imported into Blender
# Version 1.01, 6/22/2014
# Distributed with Mineways,
# Original script by Nicky, see
# Heavily modified by Wyatt Jameson, see
# Added "use_mipmap = False" to avoid edge artifacts for grass blocks, etc.
# How to use:
# To the right of the "Help" menu in the upper left, click on the "keys" icon next to the word
#"Default" and pick "Scripting".
# At the bottom of the gray window you'll see a menu "Text"; click it and select "Open Text
# Block". Go to the directory where "" is and select it. You should now
# see some text in the gray window.
# To apply this script, click on the "Run Script" button at the bottom right of the text window.
# To see that the script did something, from the upper left select "Window" and "Toggle System
# Console". If you don't have a "Window" menu item between "Render" and "Help", you have an
# older version of Blender and should consider updating. This menu item pops up a console window.
# It isn't critical to see this window, but gives you a warm and fuzzy feeling that the script has worked.
print ("Started mineways material, texture, and world setup...")
import bpy
print ("Imported bpy")
print ("Setting up materials...")
for material in[].use_textures = [True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
print ("Disabled texture slot for material: "[].texture_slots[0].use_map_alpha = True
print ("Enabled use of alpha map for material: "[].use_transparent_shadows = True
print ("Enabled receive transparent for material: "
if ( == 'Water') or ( == 'Stationary_Water'):[].raytrace_transparency.fresnel = 2[].transparency_method = 'RAYTRACE'[].raytrace_transparency.ior = 1.333[].texture_slots[0].diffuse_color_factor = 0.8[].texture_slots[0].use_map_mirror = True[].texture_slots[0].mirror_factor = 0.3[].texture_slots[0].use_map_normal = True[].texture_slots[0].normal_factor = 0.005[].texture_slots[0].bump_method = 'BUMP_BEST_QUALITY'
print ("Set up water for: "
print ("Setting up textures...")
for texture in
if ("D")) or ("Kd")):[].use_interpolation = False
# Added by Eric Haines, to avoid bleeding problems from edges for grass, etc.
# You may want to comment this line out if you are doing animation.[].use_mipmap = False
print ("Disabled interpolation for texture: "[].filter_type = 'BOX'
print ("Set filter to BOX for texture: "
print ("Jumped over texture: "
print ("Setting up world...") = True = True = True = (0.460041, 0.703876, 1) = (0.120707, 0.277449, 1)
print ("Set up the sky!") = True = 0.35
print ("Set ambient occlusion (basically shadow intensity) to 0.35. Change this to something between 0.25 and 0.5 in World > Ambient Occlusion.")
print ("Program finished. Just add lighting and a camera, and you're ready to render!")