import Blender
from Blender import Material

# A collection of helpers for the LSystem Script

def GetMaterialNameByMaterialIndex(materialIndex):
	return Material.Get()[materialIndex].getName()

def GetMaterialIndexByMaterialName(materialName):
	i = 0
	for material in Material.Get():
		if material.getName() == materialName:
			return i
		i += 1
	return -1