mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Show printer even if the configuration does not match
CURA-9278
This commit is contained in:
parent
8935ab4a2d
commit
ad14e60d26
1 changed files with 5 additions and 20 deletions
|
@ -44,19 +44,11 @@ class CompatibleMachineModel(ListModel):
|
|||
|
||||
# initialize & add current active material:
|
||||
for extruder in printer.extruders:
|
||||
if extruder.getPosition() in machine_manager.activeMachine.extruderList:
|
||||
compatible_type = machine_manager.activeMachine.extruderList[extruder.getPosition()].material.getMetaDataEntry("material", "")
|
||||
else:
|
||||
compatible_type = ""
|
||||
has_compatible_material = extruder.activeMaterial and compatible_type in [extruder.activeMaterial.type, None, "None", "", "empty"]
|
||||
|
||||
materials = []
|
||||
if has_compatible_material:
|
||||
materials.append({
|
||||
"brand": extruder.activeMaterial.brand,
|
||||
"name": extruder.activeMaterial.name,
|
||||
"hexcolor": extruder.activeMaterial.color,
|
||||
})
|
||||
materials = [{
|
||||
"brand": extruder.activeMaterial.brand,
|
||||
"name": extruder.activeMaterial.name,
|
||||
"hexcolor": extruder.activeMaterial.color,
|
||||
}]
|
||||
extruder_configs[extruder.getPosition()] = {
|
||||
"position": extruder.getPosition(),
|
||||
"core": extruder.hotendID,
|
||||
|
@ -66,13 +58,6 @@ class CompatibleMachineModel(ListModel):
|
|||
# add currently inactive, but possible materials:
|
||||
for configuration in printer.availableConfigurations:
|
||||
for extruder in configuration.extruderConfigurations:
|
||||
if extruder.position in machine_manager.activeMachine.extruderList:
|
||||
compatible_type = machine_manager.activeMachine.extruderList[extruder.position].material.getMetaDataEntry("material", "")
|
||||
else:
|
||||
compatible_type = ""
|
||||
if compatible_type not in [extruder.material.type, None, "None", "", "empty"]:
|
||||
continue
|
||||
|
||||
if not extruder.position in extruder_configs:
|
||||
Logger.log("w", f"No active extruder for position {extruder.position}.")
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue