Merge pull request #13471 from Ultimaker/CURA-9719

Add intent and quality fields to slice metadata
This commit is contained in:
Joey de l'Arago 2022-10-05 16:11:31 +02:00 committed by GitHub
commit 04ff78c704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,6 +213,7 @@ class UFPWriter(MeshWriter):
def _getSliceMetadata(self) -> Dict[str, Dict[str, Dict[str, str]]]: def _getSliceMetadata(self) -> Dict[str, Dict[str, Dict[str, str]]]:
"""Get all changed settings and all settings. For each extruder and the global stack""" """Get all changed settings and all settings. For each extruder and the global stack"""
print_information = CuraApplication.getInstance().getPrintInformation() print_information = CuraApplication.getInstance().getPrintInformation()
machine_manager = CuraApplication.getInstance().getMachineManager()
settings = { settings = {
"material": { "material": {
"length": print_information.materialLengths, "length": print_information.materialLengths,
@ -222,7 +223,9 @@ class UFPWriter(MeshWriter):
"global": { "global": {
"changes": {}, "changes": {},
"all_settings": {}, "all_settings": {},
} },
"intent": machine_manager.activeIntentCategory,
"quality": machine_manager.activeQualityOrQualityChangesName,
} }
global_stack = cast(GlobalStack, Application.getInstance().getGlobalContainerStack()) global_stack = cast(GlobalStack, Application.getInstance().getGlobalContainerStack())