mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:48:58 +08:00
Slightly simplify code
CURA-11634
This commit is contained in:
parent
ff1657305e
commit
d0080042ff
@ -63,9 +63,8 @@ class VariantNode(ContainerNode):
|
|||||||
filtered_materials = [material for material in materials if not self.machine.isExcludedMaterialBaseFile(material["id"])]
|
filtered_materials = [material for material in materials if not self.machine.isExcludedMaterialBaseFile(material["id"])]
|
||||||
|
|
||||||
for material in filtered_materials:
|
for material in filtered_materials:
|
||||||
if material.get("abstract_color", False):
|
if material.get("abstract_color", False) and not self.machine.supports_abstract_color:
|
||||||
if not self.machine.supports_abstract_color:
|
continue # do not show abstract color profiles if the machine does not support them
|
||||||
continue # do not show abstract color profiles if the machine does not support them
|
|
||||||
base_file = material["base_file"]
|
base_file = material["base_file"]
|
||||||
if base_file not in self.materials:
|
if base_file not in self.materials:
|
||||||
self.materials[base_file] = MaterialNode(material["id"], variant = self)
|
self.materials[base_file] = MaterialNode(material["id"], variant = self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user