mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
WIP: Fix material lookup problems and update definition files
This commit is contained in:
parent
730cbb25bf
commit
c469ebbf9f
19 changed files with 51 additions and 66 deletions
|
@ -249,15 +249,15 @@ class MaterialManager(QObject):
|
|||
# 1. variant-specific material
|
||||
# 2. machine-specific material
|
||||
# 3. generic material (for fdmprinter)
|
||||
material_node = None
|
||||
if variant_node is not None:
|
||||
if root_material_id in variant_node.material_map:
|
||||
material_node = variant_node.material_map.get(root_material_id)
|
||||
nodes_to_check = [variant_node, machine_node,
|
||||
machine_variant_material_map.get(self._default_machine_definition_id)]
|
||||
|
||||
# Fallback: machine-specific materials, including "fdmprinter"
|
||||
if material_node is None:
|
||||
if machine_node is not None:
|
||||
material_node = machine_node.material_map.get(root_material_id)
|
||||
material_node = None
|
||||
for node in nodes_to_check:
|
||||
if node is not None:
|
||||
material_node = node.material_map.get(root_material_id)
|
||||
if material_node:
|
||||
break
|
||||
|
||||
return material_node
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ class QualityManager(QObject):
|
|||
# No suitable quality found: not supported
|
||||
Logger.log("d", "Cannot find quality with machine [%s], variant name [%s], and materials [%s].",
|
||||
machine_definition_id, variant_name, ", ".join(root_material_id_list))
|
||||
continue
|
||||
|
||||
else:
|
||||
# In this case, we only have a specific material but NOT a variant
|
||||
if has_material:
|
||||
|
@ -332,7 +332,6 @@ class QualityManager(QObject):
|
|||
# No suitable quality found: not supported
|
||||
Logger.log("d", "Cannot find quality with machine [%s], variant name [%s], and materials [%s].",
|
||||
machine_definition_id, variant_name, ", ".join(root_material_id_list))
|
||||
continue
|
||||
|
||||
node_to_check = material_node
|
||||
if not node_to_check:
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"platform": "anycubic_i3_mega_platform.stl",
|
||||
"has_materials": false,
|
||||
"has_machine_quality": true,
|
||||
"preferred_quality": "*normal*"
|
||||
"preferred_quality_type": "normal"
|
||||
},
|
||||
|
||||
"overrides":
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"platform": "builder_premium_platform.stl",
|
||||
"platform_offset": [-126, -36, 117],
|
||||
"has_machine_quality": true,
|
||||
"preferred_quality": "*Normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
"0": "builder_premium_large_rear",
|
||||
|
@ -20,8 +20,6 @@
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
"overrides": {
|
||||
"machine_name": { "default_value": "Builder Premium Large" },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"platform": "builder_premium_platform.stl",
|
||||
"platform_offset": [-126, -36, 117],
|
||||
"has_machine_quality": true,
|
||||
"preferred_quality": "*Normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
"0": "builder_premium_medium_rear",
|
||||
|
@ -20,8 +20,6 @@
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
"overrides": {
|
||||
"machine_name": { "default_value": "Builder Premium Medium" },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"platform": "builder_premium_platform.stl",
|
||||
"platform_offset": [-126, -36, 117],
|
||||
"has_machine_quality": true,
|
||||
"preferred_quality": "*Normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
"0": "builder_premium_small_rear",
|
||||
|
@ -19,8 +19,6 @@
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
"overrides": {
|
||||
"machine_name": { "default_value": "Builder Premium Small" },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
"has_variants": true,
|
||||
|
||||
"variants_name": "Nozzle size",
|
||||
"preferred_variant": "*0.8*",
|
||||
"preferred_material": "*pla*",
|
||||
"preferred_quality": "*normal*",
|
||||
"preferred_variant_name": "0.8 mm",
|
||||
"preferred_quality_type": "normal",
|
||||
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"author": "Michael Wildermuth",
|
||||
"manufacturer": "Creality3D",
|
||||
"file_formats": "text/x-gcode",
|
||||
"preferred_quality": "*Draft*"
|
||||
"preferred_quality_type": "draft"
|
||||
},
|
||||
"overrides": {
|
||||
"machine_width": {
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
"has_machine_quality": true,
|
||||
"has_variants": true,
|
||||
"variants_name": "Head",
|
||||
"preferred_variant": "*lite04*",
|
||||
"preferred_material": "*fabtotum_pla*",
|
||||
"preferred_variant_name": "Lite 0.4 mm",
|
||||
"preferred_material": "fabtotum_pla",
|
||||
"supports_usb_connection": false
|
||||
},
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
"visible": false,
|
||||
"has_materials": true,
|
||||
"preferred_material": "generic_pla",
|
||||
"preferred_quality": "*normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
"platform": "gmax_1-5_xt-plus_s3d_full model_150707.stl",
|
||||
"has_variants": true,
|
||||
"variants_name": "Hotend",
|
||||
"preferred_variant": "*0.5mm E3D (Default)*"
|
||||
|
||||
|
||||
"preferred_variant_name": "0.5mm E3D (Default)"
|
||||
},
|
||||
|
||||
"overrides": {
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
"platform": "gmax_1-5_xt-plus_s3d_full model_150707.stl",
|
||||
"has_variants": true,
|
||||
"variants_name": "Hotend",
|
||||
"preferred_variant": "*0.5mm E3D (Default)*",
|
||||
"preferred_variant_name": "0.5mm E3D (Default)",
|
||||
"machine_extruder_trains": {
|
||||
"0": "gmax15plus_dual_extruder_0",
|
||||
"1": "gmax15plus_dual_extruder_1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"overrides": {
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
"platform": "imade3d_jellybox_platform.stl",
|
||||
"platform_offset": [ 0, -0.3, 0],
|
||||
"file_formats": "text/x-gcode",
|
||||
"preferred_variant": "*0.4*",
|
||||
"preferred_material": "*generic_pla*",
|
||||
"preferred_quality": "*fast*",
|
||||
"preferred_variant_name": "0.4 mm",
|
||||
"preferred_quality_type": "fast",
|
||||
"has_materials": true,
|
||||
"has_variants": true,
|
||||
"has_machine_materials": true,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"platform": "malyan_m200_platform.stl",
|
||||
"has_machine_quality": true,
|
||||
"has_materials": true,
|
||||
"preferred_quality": "*normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"supports_usb_connection": true,
|
||||
"visible": true,
|
||||
"first_start_actions": ["MachineSettingsAction"],
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"file_formats": "text/x-gcode",
|
||||
"has_machine_quality": true,
|
||||
"has_materials": true,
|
||||
"preferred_quality": "*normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"visible": true
|
||||
},
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"has_materials": false,
|
||||
"has_machine_quality": true,
|
||||
"platform": "tevo_blackwidow.stl",
|
||||
"preferred_quality": "*normal*"
|
||||
"preferred_quality_type": "normal"
|
||||
},
|
||||
"overrides":
|
||||
{
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
"file_formats": "text/x-gcode",
|
||||
"platform": "ultimaker2_platform.obj",
|
||||
"platform_texture": "Ultimaker2Plusbackplate.png",
|
||||
"preferred_variant": "*0.4*",
|
||||
"preferred_variant_name": "0.4 mm",
|
||||
"has_variants": true,
|
||||
"has_materials": true,
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
"has_machine_materials": true,
|
||||
"has_variant_materials": true,
|
||||
"has_variants": true,
|
||||
"preferred_variant": "*aa04*",
|
||||
"preferred_variant_name": "AA 0.4",
|
||||
"preferred_quality": "*Normal*",
|
||||
"preferred_quality_type": "normal",
|
||||
"variants_name": "Print core",
|
||||
"machine_extruder_trains":
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"has_variant_materials": true,
|
||||
"has_materials": true,
|
||||
"has_variants": true,
|
||||
"preferred_variant": "*aa04*",
|
||||
"preferred_variant_name": "AA 0.4",
|
||||
"variants_name": "Print core",
|
||||
"machine_extruder_trains":
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue