mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Use default parameter to obtain default colour
There is a built-in mechanism for this, so we don't need to do this ourselves.
This commit is contained in:
parent
bb68f488db
commit
6cac15de7d
1 changed files with 3 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (c) 2016 Ultimaker B.V.
|
#Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
#Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
|
|
||||||
|
@ -180,9 +180,7 @@ class ProcessSlicedLayersJob(Job):
|
||||||
else:
|
else:
|
||||||
# Single extruder via global stack.
|
# Single extruder via global stack.
|
||||||
material_color_map = numpy.zeros((1, 4), dtype=numpy.float32)
|
material_color_map = numpy.zeros((1, 4), dtype=numpy.float32)
|
||||||
color_code = "#e0e000"
|
color_code = global_container_stack.material.getMetaDataEntry("color_code", default="#e0e000")
|
||||||
if global_container_stack.material.getMetaDataEntry("color_code") is not None:
|
|
||||||
color_code = global_container_stack.material.getMetaDataEntry("color_code")
|
|
||||||
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