mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Fixed choosing a quality that is compatible with multiple extruders as fallback. CURA-3510
This commit is contained in:
parent
d7e35fa480
commit
32d5fbe557
2 changed files with 15 additions and 6 deletions
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 self._extruder_trains[global_container_stack.getId()][str(index)]
|
||||||
return None
|
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
|
## Adds all extruders of a specific machine definition to the extruder
|
||||||
# manager.
|
# 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),
|
quality_manager.getWholeMachineDefinition(machine_definition),
|
||||||
[material_container])
|
[material_container])
|
||||||
if not candidate_quality or candidate_quality.getId() == "empty_quality":
|
if not candidate_quality or candidate_quality.getId() == "empty_quality":
|
||||||
# Fall back to a quality
|
# Fall back to a quality (which must be compatible with all other extruders)
|
||||||
new_quality = quality_manager.findQualityByQualityType(None,
|
new_qualities = quality_manager.findAllUsableQualitiesForMachineAndExtruders(
|
||||||
quality_manager.getWholeMachineDefinition(machine_definition),
|
self._global_container_stack, ExtruderManager.getInstance().getExtruderStacks())
|
||||||
[material_container])
|
|
||||||
if new_quality:
|
if new_qualities:
|
||||||
new_quality_id = new_quality.getId()
|
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:
|
else:
|
||||||
if not old_quality_changes:
|
if not old_quality_changes:
|
||||||
new_quality_id = candidate_quality.getId()
|
new_quality_id = candidate_quality.getId()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue