mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 07:09:02 +08:00
Add intent into stats
CURA-6632
This commit is contained in:
parent
cb526f0f31
commit
74e7de1b54
@ -131,6 +131,14 @@ class GlobalStack(CuraContainerStack):
|
||||
return "machine_stack"
|
||||
return configuration_type
|
||||
|
||||
def getIntentCategory(self) -> str:
|
||||
intent_category = "default"
|
||||
for extruder in self.extruderList:
|
||||
category = extruder.intent.getMetaDataEntry("intent_category", "default")
|
||||
if category != "default" and category != intent_category:
|
||||
intent_category = category
|
||||
return intent_category
|
||||
|
||||
def getBuildplateName(self) -> Optional[str]:
|
||||
name = None
|
||||
if self.variant.getId() != "empty_variant":
|
||||
|
@ -632,13 +632,7 @@ class MachineManager(QObject):
|
||||
|
||||
if not global_container_stack:
|
||||
return ""
|
||||
intent_category = "default"
|
||||
for extruder in global_container_stack.extruderList:
|
||||
category = extruder.intent.getMetaDataEntry("intent_category", "default")
|
||||
if category != "default" and category != intent_category:
|
||||
intent_category = category
|
||||
|
||||
return intent_category
|
||||
return global_container_stack.getIntentCategory()
|
||||
|
||||
# Provies a list of extruder positions that have a different intent from the active one.
|
||||
@pyqtProperty("QStringList", notify=activeIntentChanged)
|
||||
|
@ -174,6 +174,7 @@ class SliceInfo(QObject, Extension):
|
||||
extruder_dict["extruder_settings"] = extruder_settings
|
||||
data["extruders"].append(extruder_dict)
|
||||
|
||||
data["intent_category"] = global_stack.getIntentCategory()
|
||||
data["quality_profile"] = global_stack.quality.getMetaData().get("quality_type")
|
||||
|
||||
data["user_modified_setting_keys"] = self._getUserModifiedSettingKeys()
|
||||
|
Loading…
x
Reference in New Issue
Block a user