diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index e0293c200f..7e25cd5d57 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -132,6 +132,7 @@ class MachineManager(QObject): activeMaterialChanged = pyqtSignal() activeVariantChanged = pyqtSignal() activeQualityChanged = pyqtSignal() + activeIntentChanged = pyqtSignal() activeStackChanged = pyqtSignal() # Emitted whenever the active stack is changed (ie: when changing between extruders, changing a profile, but not when changing a value) extruderChanged = pyqtSignal() @@ -270,6 +271,7 @@ class MachineManager(QObject): self.activeQualityChanged.emit() self.activeVariantChanged.emit() self.activeMaterialChanged.emit() + self.activeIntentChanged.emit() self.rootMaterialChanged.emit() self.numberExtrudersEnabledChanged.emit() @@ -607,6 +609,14 @@ class MachineManager(QObject): return False return Util.parseBool(global_container_stack.quality.getMetaDataEntry("is_experimental", False)) + @pyqtProperty(str, notify=activeIntentChanged) + def activeIntentCategory(self): + + if not self._active_container_stack: + return "" + intent_category = self._active_container_stack.intent.getMetaDataEntry("intent_category") + return intent_category + ## Returns whether there is anything unsupported in the current set-up. # # The current set-up signifies the global stack and all extruder stacks, diff --git a/cura/Settings/cura_empty_instance_containers.py b/cura/Settings/cura_empty_instance_containers.py index e8a6df8ff1..0ab37c5435 100644 --- a/cura/Settings/cura_empty_instance_containers.py +++ b/cura/Settings/cura_empty_instance_containers.py @@ -47,6 +47,7 @@ EMPTY_INTENT_CONTAINER_ID = "empty_intent" empty_intent_container = copy.deepcopy(empty_container) empty_intent_container.setMetaDataEntry("id", EMPTY_INTENT_CONTAINER_ID) empty_intent_container.setMetaDataEntry("type", "intent") +empty_intent_container.setMetaDataEntry("intent_category", "default") empty_intent_container.setName(catalog.i18nc("@info:No intent profile selected", "Default"))