mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Add property for active intent category
CURA-6598
This commit is contained in:
parent
c80cd9679f
commit
04997fca7f
2 changed files with 11 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue