mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Adjusted code to filter out the abstract colors per machine.
CURA-11634
This commit is contained in:
parent
437613dcba
commit
99b6fd7616
3 changed files with 4 additions and 5 deletions
|
@ -48,6 +48,7 @@ class MachineNode(ContainerNode):
|
|||
self.preferred_variant_name = my_metadata.get("preferred_variant_name", "")
|
||||
self.preferred_material = my_metadata.get("preferred_material", "")
|
||||
self.preferred_quality_type = my_metadata.get("preferred_quality_type", "")
|
||||
self.supports_abstract_color = parseBool(my_metadata.get("supports_abstract_color", "false"))
|
||||
|
||||
self._loadAll()
|
||||
|
||||
|
|
|
@ -63,6 +63,9 @@ class VariantNode(ContainerNode):
|
|||
filtered_materials = [material for material in materials if not self.machine.isExcludedMaterialBaseFile(material["id"])]
|
||||
|
||||
for material in filtered_materials:
|
||||
if material.get("abstract_color", False):
|
||||
if not self.machine.supports_abstract_color:
|
||||
continue # do not show abstract color profiles if the machine does not support them
|
||||
base_file = material["base_file"]
|
||||
if base_file not in self.materials:
|
||||
self.materials[base_file] = MaterialNode(material["id"], variant = self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue