diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index cd85181787..a915a21506 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -52,9 +52,11 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): if not global_container_stack: return #There is no machine to get the extruders of. for index, extruder in manager.getMachineExtruders(global_container_stack.getBottom()): + material = extruder.findContainer(type = "material") + colour = material.getMetaDataEntry("color_code", default = "#FFFF00") if material else "#FFFF00" item = { #Construct an item with only the relevant information. "name": extruder.getName(), - "colour": extruder.findContainer(type = "material").getMetaDataEntry("color_code", default = "#FFFF00"), + "colour": colour, "index": index } self.appendItem(item)