From 2c63e33b015d2b0e47a1cf424d678f8268e025ad Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:35:55 +0200 Subject: [PATCH] Prevent abstract color profiles to be filtered out for machines that support them. CURA-11634 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 +++- resources/definitions/fdmprinter.def.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index eb2bb2a788..6893a77ec5 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -919,7 +919,9 @@ class XmlMaterialProfile(InstanceContainer): base_metadata["definition"] = "fdmprinter" # Certain materials are loaded but should not be visible / selectable to the user. - base_metadata["visible"] = not base_metadata.get("abstract_color", False) + # 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: diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 571d501212..88c5811430 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -16,7 +16,8 @@ "preferred_quality_type": "normal", "machine_extruder_trains": { "0": "fdmextruder" }, "supports_usb_connection": true, - "supports_network_connection": false + "supports_network_connection": false, + "supports_abstract_color": false }, "settings": {