Adjusted code to filter out the abstract colors per machine.

CURA-11634
This commit is contained in:
Paul Kuiper 2024-09-26 14:51:22 +02:00
parent 437613dcba
commit 99b6fd7616
3 changed files with 4 additions and 5 deletions

View file

@ -918,11 +918,6 @@ class XmlMaterialProfile(InstanceContainer):
base_metadata["properties"] = property_values
base_metadata["definition"] = "fdmprinter"
# Certain materials are loaded but should not be visible / selectable to the user.
# Only show abstract color profiles (Any Color) if the machine supports them
base_metadata["visible"] = (not base_metadata.get("abstract_color", False)
or base_metadata.get("supports_abstract_color", False))
compatible_entries = data.iterfind("./um:settings/um:setting[@key='hardware compatible']", cls.__namespaces)
try:
common_compatibility = cls._parseCompatibleValue(next(compatible_entries).text) # type: ignore