mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Default color if no material color is available. CURA-3273
This commit is contained in:
parent
f571c5ea8e
commit
1d6ef4bc3c
1 changed files with 2 additions and 0 deletions
|
@ -177,6 +177,8 @@ class ProcessSlicedLayersJob(Job):
|
||||||
material_color_map = numpy.zeros((1, 4), dtype=numpy.float32)
|
material_color_map = numpy.zeros((1, 4), dtype=numpy.float32)
|
||||||
material = global_container_stack.findContainer({"type": "material"})
|
material = global_container_stack.findContainer({"type": "material"})
|
||||||
color_code = material.getMetaDataEntry("color_code")
|
color_code = material.getMetaDataEntry("color_code")
|
||||||
|
if color_code is None: # not all stacks have a material color
|
||||||
|
color_code = "#e0e000"
|
||||||
color = colorCodeToRGBA(color_code)
|
color = colorCodeToRGBA(color_code)
|
||||||
material_color_map[0, :] = color
|
material_color_map[0, :] = color
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue