mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Merge pull request #4284 from Ultimaker/CURA-5668_fix_quality_fallback
CURA-5668 Fix quality lookup fallback mechanism
This commit is contained in:
commit
d097b06479
1 changed files with 13 additions and 3 deletions
|
@ -259,8 +259,12 @@ class QualityManager(QObject):
|
|||
# 2. machine-nozzle-and-material-specific qualities if exist
|
||||
# 3. machine-nozzle-specific qualities if exist
|
||||
# 4. machine-material-specific qualities if exist
|
||||
# 5. machine-specific qualities if exist
|
||||
# 6. generic qualities if exist
|
||||
# 5. machine-specific global qualities if exist, otherwise generic global qualities
|
||||
# NOTE: We DO NOT fail back to generic global qualities if machine-specific global qualities exist.
|
||||
# This is because when a machine defines its own global qualities such as Normal, Fine, etc.,
|
||||
# it is intended to maintain those specific qualities ONLY. If we still fail back to the generic
|
||||
# global qualities, there can be unimplemented quality types e.g. "coarse", and this is not
|
||||
# correct.
|
||||
# Each points above can be represented as a node in the lookup tree, so here we simply put those nodes into
|
||||
# the list with priorities as the order. Later, we just need to loop over each node in this list and fetch
|
||||
# qualities from there.
|
||||
|
@ -289,7 +293,13 @@ class QualityManager(QObject):
|
|||
|
||||
addNodesToCheck(machine_node, nodes_to_check, node_info_list_0, 0)
|
||||
|
||||
nodes_to_check += [machine_node, default_machine_node]
|
||||
# The last fall back will be the global qualities (either from the machine-specific node or the generic
|
||||
# node), but we only use one. For details see the overview comments above.
|
||||
if machine_node.quality_type_map:
|
||||
nodes_to_check += [machine_node]
|
||||
else:
|
||||
nodes_to_check += [default_machine_node]
|
||||
|
||||
for node in nodes_to_check:
|
||||
if node and node.quality_type_map:
|
||||
if has_variant_materials:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue