From 7f093be75a1a31f07eba79ec89ab08ebc2d9622d Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 10:41:50 +0200 Subject: [PATCH] Fix check for has_variants & has_materials These are defined as bool values instead of strings in UM2+ definitions, so I would expect other machine definitions (including jedi) also use bools. CURA-333 --- cura/ExtruderManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index f9079c6328..c83f8d9af7 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -138,7 +138,7 @@ class ExtruderManager(QObject): #Find the variant to use for this extruder. variant = container_registry.getEmptyInstanceContainer() - if machine_definition.getMetaDataEntry("has_variants", default = "False") == "True": + if machine_definition.getMetaDataEntry("has_variants"): #First add any variant. Later, overwrite with preference if the preference is valid. variants = container_registry.findInstanceContainers(machine = machine_id, type = "variant") if len(variants) >= 1: @@ -155,7 +155,7 @@ class ExtruderManager(QObject): #Find a material to use for this variant. material = container_registry.getEmptyInstanceContainer() - if machine_definition.getMetaDataEntry("has_materials", default = "False") == "True": + if machine_definition.getMetaDataEntry("has_materials"): #First add any material. Later, overwrite with preference if the preference is valid. if machine_definition.getMetaDataEntry("has_variant_materials", default = "False") == "True": materials = container_registry.findInstanceContainers(type = "material", machine = machine_id, variant = variant.getId())