mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 21:45:51 +08: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
@ -259,8 +259,12 @@ class QualityManager(QObject):
|
|||||||
# 2. machine-nozzle-and-material-specific qualities if exist
|
# 2. machine-nozzle-and-material-specific qualities if exist
|
||||||
# 3. machine-nozzle-specific qualities if exist
|
# 3. machine-nozzle-specific qualities if exist
|
||||||
# 4. machine-material-specific qualities if exist
|
# 4. machine-material-specific qualities if exist
|
||||||
# 5. machine-specific qualities if exist
|
# 5. machine-specific global qualities if exist, otherwise generic global qualities
|
||||||
# 6. generic qualities if exist
|
# 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
|
# 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
|
# the list with priorities as the order. Later, we just need to loop over each node in this list and fetch
|
||||||
# qualities from there.
|
# qualities from there.
|
||||||
@ -289,7 +293,13 @@ class QualityManager(QObject):
|
|||||||
|
|
||||||
addNodesToCheck(machine_node, nodes_to_check, node_info_list_0, 0)
|
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:
|
for node in nodes_to_check:
|
||||||
if node and node.quality_type_map:
|
if node and node.quality_type_map:
|
||||||
if has_variant_materials:
|
if has_variant_materials:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user