Add default for colour code of material

Otherwise you get an error that the colour code could not be found.

Fixes #1869.
This commit is contained in:
Ghostkeeper 2017-05-24 15:19:12 +02:00
parent 374b6d4e35
commit 3ff9ad5d4e
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -172,7 +172,7 @@ class ProcessSlicedLayersJob(Job):
for extruder in extruders:
material = extruder.findContainer({"type": "material"})
position = int(extruder.getMetaDataEntry("position", default="0")) # Get the position
color_code = material.getMetaDataEntry("color_code")
color_code = material.getMetaDataEntry("color_code", default="#e0e000")
color = colorCodeToRGBA(color_code)
material_color_map[position, :] = color
else: