mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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:
parent
e6f61f3bbc
commit
ce6814d45d
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ class ProcessSlicedLayersJob(Job):
|
||||||
for extruder in extruders:
|
for extruder in extruders:
|
||||||
material = extruder.findContainer({"type": "material"})
|
material = extruder.findContainer({"type": "material"})
|
||||||
position = int(extruder.getMetaDataEntry("position", default="0")) # Get the position
|
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)
|
color = colorCodeToRGBA(color_code)
|
||||||
material_color_map[position, :] = color
|
material_color_map[position, :] = color
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue