Also check for 'abstract color' (support) when a single material is added.

Previously, this was only checked on 'load all' leading to some weird edge-ish cases where loading an any-color material on a printer that does support it, briefly also made it available on printers that (otherwise would, but) don't -- but only for that session.

part of CURA-12159 (also refer to CURA-11634)
This commit is contained in:
Remco Burema 2024-10-02 11:49:29 +02:00
parent d0080042ff
commit 2e7450bbf3

View file

@ -128,6 +128,8 @@ class VariantNode(ContainerNode):
return # We won't add any materials.
material_definition = container.getMetaDataEntry("definition")
if (not self.machine.supports_abstract_color) and container.getMetaDataEntry("abstract_color", False):
return
base_file = container.getMetaDataEntry("base_file")
if self.machine.isExcludedMaterialBaseFile(base_file):
return # Material is forbidden for this printer.