mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Quality is now set for extruder, regardless if the machine has machine specific qualities
This commit is contained in:
parent
fa72630c0a
commit
8c43d4c4cb
1 changed files with 14 additions and 14 deletions
|
@ -18,7 +18,7 @@ class ExtruderManager(QObject):
|
||||||
## Notify when the user switches the currently active extruder.
|
## Notify when the user switches the currently active extruder.
|
||||||
activeExtruderChanged = pyqtSignal()
|
activeExtruderChanged = pyqtSignal()
|
||||||
|
|
||||||
## Registers listeners and such to listen to changes to the extruders.
|
## Registers listeners and such to listen to chafnges to the extruders.
|
||||||
def __init__(self, parent = None):
|
def __init__(self, parent = None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self._extruder_trains = { } #Per machine, a dictionary of extruder container stack IDs.
|
self._extruder_trains = { } #Per machine, a dictionary of extruder container stack IDs.
|
||||||
|
@ -169,19 +169,19 @@ class ExtruderManager(QObject):
|
||||||
|
|
||||||
#Find a quality to use for this extruder.
|
#Find a quality to use for this extruder.
|
||||||
quality = container_registry.getEmptyInstanceContainer()
|
quality = container_registry.getEmptyInstanceContainer()
|
||||||
if machine_definition.getMetaDataEntry("has_machine_quality"):
|
|
||||||
#First add any quality. Later, overwrite with preference if the preference is valid.
|
#First add any quality. Later, overwrite with preference if the preference is valid.
|
||||||
qualities = container_registry.findInstanceContainers(type = "quality")
|
qualities = container_registry.findInstanceContainers(type = "quality")
|
||||||
if len(qualities) >= 1:
|
if len(qualities) >= 1:
|
||||||
quality = qualities[0]
|
quality = qualities[0]
|
||||||
preferred_quality_id = machine_definition.getMetaDataEntry("preferred_quality")
|
preferred_quality_id = machine_definition.getMetaDataEntry("preferred_quality")
|
||||||
if preferred_quality_id:
|
if preferred_quality_id:
|
||||||
preferred_quality = container_registry.findInstanceContainers(id = preferred_quality_id.lower(), type = "quality")
|
preferred_quality = container_registry.findInstanceContainers(id = preferred_quality_id.lower(), type = "quality")
|
||||||
if len(preferred_quality) >= 1:
|
if len(preferred_quality) >= 1:
|
||||||
quality = preferred_quality[0]
|
quality = preferred_quality[0]
|
||||||
else:
|
else:
|
||||||
UM.Logger.log("w", "The preferred quality \"%s\" of machine %s doesn't exist or is not a quality profile.", preferred_quality_id, machine_id)
|
UM.Logger.log("w", "The preferred quality \"%s\" of machine %s doesn't exist or is not a quality profile.", preferred_quality_id, machine_id)
|
||||||
#And leave it at the default quality.
|
#And leave it at the default quality.
|
||||||
container_stack.addContainer(quality)
|
container_stack.addContainer(quality)
|
||||||
|
|
||||||
user_profile = container_registry.findInstanceContainers(id = extruder_stack_id + "_current_settings")
|
user_profile = container_registry.findInstanceContainers(id = extruder_stack_id + "_current_settings")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue