Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created August 15, 2015 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/49a48a7f8999b6e66336 to your computer and use it in GitHub Desktop.
Save zeffii/49a48a7f8999b6e66336 to your computer and use it in GitHub Desktop.
for material in bpy.data.materials:
print("Started "+str(material))
# if the material is transparent use a special shader
if any((material == bpy.data.materials.get(tm)) for tm in transparentBlocks):
pass
# if the material is a light emmitting block use a special shader
elif any((material == bpy.data.materials.get(lm)) for lm in lightBlocks):
pass
# if the material is stationary water, use a special shader
elif material.name == "Stationary_Water":
pass
# if the material is flowing water, use a special shader
elif material.name == "Flowing_Water":
pass
# if the material is slime, use a special shader
elif material.name == "Slime":
pass
# if the material is ice, use a special shader
elif material.name == "Ice":
pass
# if the material is stained glass, use a special shader
elif material.name in {"Stained_Glass", "Stained_Glass_Pane"}:
pass
else:
# use a normal shader
Normal_Shader(material)
print("Finished "+str(material))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment