mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 18:19:15 +08:00
Fixed choosing a quality that is compatible with multiple extruders as fallback. CURA-3510
This commit is contained in:
parent
d7e35fa480
commit
32d5fbe557
7
cura/Settings/ExtruderManager.py
Normal file → Executable file
7
cura/Settings/ExtruderManager.py
Normal file → Executable file
@ -135,6 +135,13 @@ class ExtruderManager(QObject):
|
||||
return self._extruder_trains[global_container_stack.getId()][str(index)]
|
||||
return None
|
||||
|
||||
## Get all extruder stacks
|
||||
def getExtruderStacks(self):
|
||||
result = []
|
||||
for i in range(self.extruderCount):
|
||||
result.append(self.getExtruderStack(i))
|
||||
return result
|
||||
|
||||
## Adds all extruders of a specific machine definition to the extruder
|
||||
# manager.
|
||||
#
|
||||
|
14
cura/Settings/MachineManager.py
Normal file → Executable file
14
cura/Settings/MachineManager.py
Normal file → Executable file
@ -749,12 +749,14 @@ class MachineManager(QObject):
|
||||
quality_manager.getWholeMachineDefinition(machine_definition),
|
||||
[material_container])
|
||||
if not candidate_quality or candidate_quality.getId() == "empty_quality":
|
||||
# Fall back to a quality
|
||||
new_quality = quality_manager.findQualityByQualityType(None,
|
||||
quality_manager.getWholeMachineDefinition(machine_definition),
|
||||
[material_container])
|
||||
if new_quality:
|
||||
new_quality_id = new_quality.getId()
|
||||
# Fall back to a quality (which must be compatible with all other extruders)
|
||||
new_qualities = quality_manager.findAllUsableQualitiesForMachineAndExtruders(
|
||||
self._global_container_stack, ExtruderManager.getInstance().getExtruderStacks())
|
||||
|
||||
if new_qualities:
|
||||
new_quality_id = new_qualities[0].getId() # Just pick the first available one
|
||||
else:
|
||||
Logger.log("w", "No quality profile found that matches the current machine and extruders.")
|
||||
else:
|
||||
if not old_quality_changes:
|
||||
new_quality_id = candidate_quality.getId()
|
||||
|
Loading…
x
Reference in New Issue
Block a user