if self.cells.has_key(i) and self.cells[i].has_key(j) and self.cells[i][j].has_key(k):
if i in self.cells and j in self.cells[i] and k in self.cells[i][j]:
material[c4d.MATERIAL_USE_COLOR] = True
material[c4d.MATERIAL_USE_DIFFUSION] = True
material[c4d.MATERIAL_DIFFUSION_BRIGHTNESS] = 0.25
material[c4d.MATERIAL_USE_LUMINANCE] = True
material[c4d.MATERIAL_USE_REFLECTION] = True
material[c4d.MATERIAL_USE_NORMAL] = True