mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
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
This commit is contained in:
parent
631ab9c0a1
commit
7f093be75a
1 changed files with 2 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue