mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Fix quality lookup logic for extruders
CURA-5694 - Add convenience functions into GlobalStack - Use "has_variants" and "has_materials" instead of "has_variant_materials" - Remove "has_variant_materials" - For extruder qualities, skip global qualities if the machine has variants or materials
This commit is contained in:
parent
d3356cdba6
commit
9aea0e5109
6 changed files with 13 additions and 7 deletions
|
@ -200,7 +200,9 @@ class QualityManager(QObject):
|
|||
machine_definition_id = getMachineDefinitionIDForQualitySearch(machine.definition)
|
||||
|
||||
# This determines if we should only get the global qualities for the global stack and skip the global qualities for the extruder stacks
|
||||
has_variant_materials = parseBool(machine.getMetaDataEntry("has_variant_materials", False))
|
||||
has_variants = machine.getHasVariants()
|
||||
has_materials = machine.getHasMaterials()
|
||||
has_variants_or_materials = has_variants or has_materials
|
||||
|
||||
# To find the quality container for the GlobalStack, check in the following fall-back manner:
|
||||
# (1) the machine-specific node
|
||||
|
@ -214,7 +216,7 @@ class QualityManager(QObject):
|
|||
for node in nodes_to_check:
|
||||
if node and node.quality_type_map:
|
||||
# Only include global qualities
|
||||
if has_variant_materials:
|
||||
if has_variants_or_materials:
|
||||
quality_node = list(node.quality_type_map.values())[0]
|
||||
is_global_quality = parseBool(quality_node.metadata.get("global_quality", False))
|
||||
if not is_global_quality:
|
||||
|
@ -302,7 +304,7 @@ class QualityManager(QObject):
|
|||
|
||||
for node in nodes_to_check:
|
||||
if node and node.quality_type_map:
|
||||
if has_variant_materials:
|
||||
if has_variants_or_materials:
|
||||
# Only include variant qualities; skip non global qualities
|
||||
quality_node = list(node.quality_type_map.values())[0]
|
||||
is_global_quality = parseBool(quality_node.metadata.get("global_quality", False))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue