From b894e3888c40ba103ddbaf1039da14f0468bbef7 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 10 Aug 2016 10:55:25 +0200 Subject: [PATCH] Introduce a quality_type metadata entry that can be used to distinguish qualities Since we want the profile to be selected based on material and we have profiles like "ABS Normal" and "PLA Normal" we need some way to make sure we select the same. Contributes to CURA-2006 --- cura/Settings/ContainerManager.py | 2 +- resources/quality/high.inst.cfg | 1 + resources/quality/low.inst.cfg | 1 + resources/quality/normal.inst.cfg | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index c23823d71f..b1cc060c23 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -422,7 +422,7 @@ class ContainerManager(QObject): new_quality_changes = user_container.duplicate(stack.getId() + "_" + unique_id, unique_name) new_quality_changes.setMetaDataEntry("type", "quality_changes") - new_quality_changes.addMetaDataEntry("quality", quality_container.getId()) + new_quality_changes.addMetaDataEntry("quality", quality_container.getMetaDataEntry("quality_type")) if not global_stack.getMetaDataEntry("has_machine_quality"): new_quality_changes.setDefinition(UM.Settings.ContainerRegistry.getInstance().findContainers(id = "fdmprinter")[0]) diff --git a/resources/quality/high.inst.cfg b/resources/quality/high.inst.cfg index b4498c6c8b..ec3ab18fd6 100644 --- a/resources/quality/high.inst.cfg +++ b/resources/quality/high.inst.cfg @@ -5,6 +5,7 @@ definition = fdmprinter [metadata] type = quality +quality_type = high weight = -3 [values] diff --git a/resources/quality/low.inst.cfg b/resources/quality/low.inst.cfg index d34a7c6461..787325c27c 100644 --- a/resources/quality/low.inst.cfg +++ b/resources/quality/low.inst.cfg @@ -5,6 +5,7 @@ definition = fdmprinter [metadata] type = quality +quality_type = low weight = -1 [values] diff --git a/resources/quality/normal.inst.cfg b/resources/quality/normal.inst.cfg index 417c7c700f..cfd70de49c 100644 --- a/resources/quality/normal.inst.cfg +++ b/resources/quality/normal.inst.cfg @@ -5,6 +5,7 @@ definition = fdmprinter [metadata] type = quality +quality_type = normal weight = -2 [values]